1
This commit is contained in:
1 parent
d014a633fd
commit
5b7197a2ab
1 file changed
+3
-3
@@ -118,7 +118,7 @@ def step1(versionId):
|
||||
os.makedirs(jsonSubDir)
|
||||
|
||||
# 移动JSON文件到新目录
|
||||
newJsonPath = os.path.join(jsonSubDir, f'{versionId}.json')
|
||||
newJsonPath = os.path.join(jsonSubDir, '3DPrintLayout.json')
|
||||
if os.path.exists(localFilePath):
|
||||
if os.path.exists(newJsonPath):
|
||||
os.remove(newJsonPath)
|
||||
@@ -197,7 +197,7 @@ def main(work_dir=None):
|
||||
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} JSON文件下载数据失败,等待10秒')
|
||||
time.sleep(10)
|
||||
continue
|
||||
jsonFilePath = os.path.join(res, 'json', f'{versionId}.json')
|
||||
jsonFilePath = os.path.join(res, 'json', '3DPrintLayout.json')
|
||||
# 确保 jsonFilePath 是文件而不是目录
|
||||
if not os.path.isfile(jsonFilePath):
|
||||
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} JSON文件不存在: {jsonFilePath},等待10秒')
|
||||
@@ -215,7 +215,7 @@ def main(work_dir=None):
|
||||
if file.endswith('.obj'):
|
||||
objCounts += 1
|
||||
requestApiToUpdateSliceStatus(versionId,objCounts)
|
||||
time.sleep(10)
|
||||
#time.sleep(10)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in new issue
Block a user