|
|
|
@ -82,10 +82,10 @@ def step1(versionId): |
|
|
|
if not ossClient().object_exists(jsonFilePath): |
|
|
|
if not ossClient().object_exists(jsonFilePath): |
|
|
|
return False |
|
|
|
return False |
|
|
|
#下载文件到项目所在目录 |
|
|
|
#下载文件到项目所在目录 |
|
|
|
dirNow = currentDir + '/batchPrint/' + versionId + '/json' |
|
|
|
dirNow = os.path.join(currentDir, 'batchPrint', versionId, 'json') |
|
|
|
if not os.path.exists(dirNow): |
|
|
|
if not os.path.exists(dirNow): |
|
|
|
os.makedirs(dirNow) |
|
|
|
os.makedirs(dirNow) |
|
|
|
localFilePath = dirNow + '/' + versionId + '.json' |
|
|
|
localFilePath = os.path.join(dirNow, f'{versionId}.json') |
|
|
|
ossClient().get_object_to_file(jsonFilePath, localFilePath) |
|
|
|
ossClient().get_object_to_file(jsonFilePath, localFilePath) |
|
|
|
return True |
|
|
|
return True |
|
|
|
|
|
|
|
|
|
|
|
@ -141,7 +141,7 @@ def main(work_dir=None): |
|
|
|
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秒') |
|
|
|
time.sleep(10) |
|
|
|
time.sleep(10) |
|
|
|
continue |
|
|
|
continue |
|
|
|
jsonFilePath = currentDir + '/batchPrint/' + versionId + '/json/' + versionId + '.json' |
|
|
|
jsonFilePath = os.path.join(currentDir, 'batchPrint', versionId, 'json', f'{versionId}.json') |
|
|
|
step2(jsonFilePath, versionId) |
|
|
|
step2(jsonFilePath, versionId) |
|
|
|
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} 数据处理完成,等待10秒') |
|
|
|
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} 数据处理完成,等待10秒') |
|
|
|
requestApiToUpdateSliceStatus(versionId) |
|
|
|
requestApiToUpdateSliceStatus(versionId) |
|
|
|
|