From 9ae4d90c6358f4b538f36ba4a39869954bf2316c Mon Sep 17 00:00:00 2001 From: andevatikul <138834899+andevatikul@users.noreply.github.com> Date: Tue, 12 Aug 2025 00:22:28 +0600 Subject: [PATCH] Increase ideal timeout value to 5 seconds. It is good to increase ideal timeout value to 5 seconds to avoid any network latency related error/request failure. --- queue_job/jobrunner/runner.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/queue_job/jobrunner/runner.py b/queue_job/jobrunner/runner.py index 04b163bd4..4e90c5948 100644 --- a/queue_job/jobrunner/runner.py +++ b/queue_job/jobrunner/runner.py @@ -245,7 +245,8 @@ def urlopen(): auth = (user, password) # we are not interested in the result, so we set a short timeout # but not too short so we trap and log hard configuration errors - response = requests.get(url, timeout=1, auth=auth) + # Set timeout to 5 seconds to avoid any network latency related error/request failure. + response = requests.get(url, timeout=5, auth=auth) # raise_for_status will result in either nothing, a Client Error # for HTTP Response codes between 400 and 500 or a Server Error