Respect timeout -1 in worker hard kill (#1187)

main
Zach Kanzler 5 years ago committed by GitHub
parent 43fb21b827
commit 2e245a7b4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

Loading…
Cancel
Save