|
|
|
@ -1,4 +1,4 @@ |
|
|
|
import os |
|
|
|
import os,shutil |
|
|
|
import redis |
|
|
|
import redis |
|
|
|
import oss2,time,sys |
|
|
|
import oss2,time,sys |
|
|
|
import requests |
|
|
|
import requests |
|
|
|
@ -136,6 +136,13 @@ def main(work_dir=None): |
|
|
|
|
|
|
|
|
|
|
|
versionId = str(data) |
|
|
|
versionId = str(data) |
|
|
|
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} 正在处理版次ID={versionId}') |
|
|
|
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) |
|
|
|
res = step1(versionId) |
|
|
|
if not res: |
|
|
|
if not res: |
|
|
|
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} JSON文件下载数据失败,等待10秒') |
|
|
|
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} JSON文件下载数据失败,等待10秒') |
|
|
|
|