Skip to content

Commit

Permalink
Add job timeout handling in JobRunner for periodic jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
miaow2 authored and jeremystretch committed Oct 16, 2024
1 parent aa3f4cb commit e8e95f5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions netbox/netbox/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ def handle(cls, job, *args, **kwargs):
finally:
if job.interval:
new_scheduled_time = (job.scheduled or job.started) + timedelta(minutes=job.interval)
if job.object and getattr(job.object, "python_class", None):
kwargs["job_timeout"] = job.object.python_class.job_timeout
cls.enqueue(
instance=job.object,
user=job.user,
Expand Down

0 comments on commit e8e95f5

Please sign in to comment.