From df46e3a0e5ad93fa71f5d216997e376af33b2a6d Mon Sep 17 00:00:00 2001 From: bennykok Date: Thu, 1 Feb 2024 23:19:28 +0800 Subject: [PATCH] chore: add CD_ENABLE_RUN_LOG flag --- custom_routes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_routes.py b/custom_routes.py index 84d0444..40a5213 100644 --- a/custom_routes.py +++ b/custom_routes.py @@ -27,6 +27,7 @@ api = None api_task = None prompt_metadata = {} cd_enable_log = os.environ.get('CD_ENABLE_LOG', 'false').lower() == 'true' +cd_enable_run_log = os.environ.get('CD_ENABLE_RUN_LOG', 'false').lower() == 'true' def post_prompt(json_data): prompt_server = server.PromptServer.instance @@ -264,7 +265,7 @@ def update_run(prompt_id, status: Status): try: requests.post(status_endpoint, json=body) - if status == Status.SUCCESS or status == Status.FAILED: + if cd_enable_run_log and (status == Status.SUCCESS or status == Status.FAILED): try: with open(comfyui_file_path, 'r') as log_file: # log_data = log_file.read()