2
This commit is contained in:
1 parent
0a4ed8228c
commit
7d7d843760
1 file changed
+8
-1
@@ -1,4 +1,4 @@
|
||||
import os
|
||||
import os,shutil
|
||||
import redis
|
||||
import oss2,time,sys
|
||||
import requests
|
||||
@@ -136,6 +136,13 @@ def main(work_dir=None):
|
||||
|
||||
versionId = str(data)
|
||||
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} 正在处理版次ID={versionId}')
|
||||
|
||||
#执行前,先删除指定目录下的所有文件
|
||||
objFilePath = os.path.join(currentDir, 'batchPrint', versionId, 'data')
|
||||
#判断目录是否存在,存在就直接删除
|
||||
if os.path.exists(objFilePath):
|
||||
shutil.rmtree(objFilePath)
|
||||
|
||||
res = step1(versionId)
|
||||
if not res:
|
||||
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} JSON文件下载数据失败,等待10秒')
|
||||
|
||||
Reference in new issue
Block a user