1
This commit is contained in:
1 parent
06018dad6e
commit
c5dbd09ad1
1 file changed
+2
-2
@@ -77,7 +77,7 @@ def active_object(obj):
|
|||||||
def down_obj_fromoss(pid, print_type=1, order_id=None):
|
def down_obj_fromoss(pid, print_type=1, order_id=None):
|
||||||
# print_type:// 打印状态 1:正常打印 2:重打 3:加打,4: 样品
|
# print_type:// 打印状态 1:正常打印 2:重打 3:加打,4: 样品
|
||||||
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} pid: {pid} 开始下载模型,若网络异常将每间隔2秒重试10次...')
|
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} pid: {pid} 开始下载模型,若网络异常将每间隔2秒重试10次...')
|
||||||
if not order_id is None:
|
if order_id is not None:
|
||||||
path = os.path.join(workdir, f'{pid}_{order_id}')
|
path = os.path.join(workdir, f'{pid}_{order_id}')
|
||||||
else:
|
else:
|
||||||
path = os.path.join(workdir, pid)
|
path = os.path.join(workdir, pid)
|
||||||
@@ -97,7 +97,7 @@ def down_obj_fromoss(pid, print_type=1, order_id=None):
|
|||||||
return -1
|
return -1
|
||||||
print(res.text)
|
print(res.text)
|
||||||
if res.json()['data'] != "":
|
if res.json()['data'] != "":
|
||||||
prefix = f'objs/print/{pid}/{res.json()["data"]}/{str(order_id)}/'
|
prefix = f'objs/print/{pid}/{res.json()["data"]}/{str(order_id)}'
|
||||||
|
|
||||||
|
|
||||||
print("最终的prefix",prefix)
|
print("最终的prefix",prefix)
|
||||||
|
|||||||
Reference in new issue
Block a user