Skip to content

Commit 55e358e

Browse files
committed
Update process_inference_job_queue to refresh progress for queued jobs
1 parent 2321ff7 commit 55e358e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

inference/tasks.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ def process_inference_job_queue():
1818
return "Queue processing already in progress"
1919

2020
try:
21+
# Reevaluate progress and update status of all inference jobs that are not currently queued
22+
for job in InferenceJob.objects.exclude(status=InferenceJobStatus.QUEUED):
23+
job.reevaluate_progress_and_update_status()
24+
2125
# Look for pending jobs first
2226
pending_jobs = InferenceJob.objects.filter(status=InferenceJobStatus.PENDING)
2327

0 commit comments

Comments
 (0)