From f107e44977a7713d268b982b598a1e380e9d8495 Mon Sep 17 00:00:00 2001 From: dongchangxi <458593490@qq.com> Date: Mon, 14 Jul 2025 16:32:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + comfyui/main.py | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/.gitignore b/.gitignore index 1211cf9..258c083 100644 --- a/.gitignore +++ b/.gitignore @@ -57,3 +57,4 @@ openapi/__pycache__/utils.cpython-311.pyc tools/pic_for_obj.zip yj_local_build/xml.zip openapi.zip +apps/__pycache__/ diff --git a/comfyui/main.py b/comfyui/main.py index f94285f..6a52571 100644 --- a/comfyui/main.py +++ b/comfyui/main.py @@ -246,10 +246,20 @@ if __name__ == '__main__': except json.JSONDecodeError as e: print(f'JSON解析错误:{e}') utils.notify(f'JSON解析错误:{e}') + + + tempFile = os.path.join(downloadPath, f"{pid}_{orderId}_{styleNumber}_解析错误.txt") + with open(tempFile, 'w') as f: + f.write('') + time.sleep(10) continue except Exception as e: + print(f'错误:{e}') + tempFile = os.path.join(downloadPath, f"{pid}_{orderId}_{styleNumber}_异常错误.txt") + with open(tempFile, 'w') as f: + f.write(e) utils.notify(f'错误:{e}') time.sleep(10) r = utils.create_redis_connection()