Add job timeout handling in JobRunner for periodic jobs

This commit is contained in:
Artem Kotik
2024-10-16 11:39:23 +02:00
committed by Jeremy Stretch
parent aa3f4cb5f5
commit e8e95f5e97

View File

@@ -68,6 +68,8 @@ class JobRunner(ABC):
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,