From 7ab3d2a234325c2a502002ea7bdee7df3e0c8dfe Mon Sep 17 00:00:00 2001 From: Pseudotools Admin <146304315+Pseudotools@users.noreply.github.com> Date: Sun, 10 Nov 2024 12:55:35 -0800 Subject: [PATCH] fix: convert environment variables to int (#70) * convert environment variables to int COMFY_POLLING_INTERVAL_MS and COMFY_POLLING_MAX_RETRIES should be integers. * chore: remove unnecessary comment --------- Co-authored-by: NERDDISCO <492378+TimPietrusky@users.noreply.github.com> --- src/rp_handler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rp_handler.py b/src/rp_handler.py index 2150284..314b905 100644 --- a/src/rp_handler.py +++ b/src/rp_handler.py @@ -14,9 +14,9 @@ # Maximum number of API check attempts COMFY_API_AVAILABLE_MAX_RETRIES = 500 # Time to wait between poll attempts in milliseconds -COMFY_POLLING_INTERVAL_MS = os.environ.get("COMFY_POLLING_INTERVAL_MS", 250) +COMFY_POLLING_INTERVAL_MS = int(os.environ.get("COMFY_POLLING_INTERVAL_MS", 250)) # Maximum number of poll attempts -COMFY_POLLING_MAX_RETRIES = os.environ.get("COMFY_POLLING_MAX_RETRIES", 500) +COMFY_POLLING_MAX_RETRIES = int(os.environ.get("COMFY_POLLING_MAX_RETRIES", 500)) # Host where ComfyUI is running COMFY_HOST = "127.0.0.1:8188" # Enforce a clean state after each job is done