From da5904ce229d43d74c7d05a8c49f0c73527d049c Mon Sep 17 00:00:00 2001 From: dongchangxi <458593490@qq.com> Date: Thu, 14 Aug 2025 14:42:48 +0800 Subject: [PATCH] 1 --- timer/external_order_glbV2.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/timer/external_order_glbV2.py b/timer/external_order_glbV2.py index 3f2366c..eecf443 100644 --- a/timer/external_order_glbV2.py +++ b/timer/external_order_glbV2.py @@ -283,6 +283,16 @@ def export_and_update_glbs(pid,order_ids): print(strRequest) res = requests.post("https://shop.api.suwa3d.com/api/printOrder/updateExternalOrderStatusV2", data={'pid': pid,"order_ids":order_ids}) print(res.text) + # 记录日志文件 + logPath = os.path.join(config.workdir,'log/external_order_glbV2',pid,f'{order_ids[0]}.log') + # 创建并且写入日志 + with open(logPath, 'w') as f: + f.write(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} pid: {pid} 订单状态更新完成,共费时{libs.diff_time(start_time)}\n') + f.write(f'{res.text}\n') + f.write(f'{strRequest}\n') + + + #执行获取obj缩略图 print("执行获取obj全身缩略图脚本") os.system(f'python d:\\make2\\tools\pic_for_obj\image_rander_small.py -pid {pid} -i D://print/{pid} -o D://print/{pid}')