summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach Kanzler <theY4Kman@gmail.com>2020-02-24 19:04:11 -0500
committerGitHub <noreply@github.com>2020-02-25 07:04:11 +0700
commit2e245a7b4e1a34c6b11ffbf971b75c1d00df8865 (patch)
treee1ed33f7456f753374f06496b60e88e4f41e9bf2
parent43fb21b827bdcbef5056c59361be3e2e690b682d (diff)
downloadrq-2e245a7b4e1a34c6b11ffbf971b75c1d00df8865.tar.gz
Respect timeout -1 in worker hard kill (#1187)
-rw-r--r--rq/worker.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/rq/worker.py b/rq/worker.py
index 92e63b4..8c89709 100644
--- a/rq/worker.py
+++ b/rq/worker.py
@@ -688,7 +688,7 @@ class Worker(object):
self.heartbeat(self.job_monitoring_interval + 5)
# Kill the job from this side if something is really wrong (interpreter lock/etc).
- if (utcnow() - job.started_at).total_seconds() > (job.timeout + 1):
+ if job.timeout != -1 and (utcnow() - job.started_at).total_seconds() > (job.timeout + 1):
self.kill_horse()
break