Merge pull request #68 from airbnb/fix_queue

Fixing queue prioritization
This commit is contained in:
Maxime Beauchemin 2015-06-23 10:34:19 -07:00
Родитель b235411b5c 07ed7e640e
Коммит 9abfd10cf8
1 изменённых файлов: 3 добавлений и 5 удалений

Просмотреть файл

@ -283,11 +283,9 @@ class SchedulerJob(BaseJob):
logging.debug('Triggering retry: ' + str(ti))
executor.queue_task_instance(ti)
elif ti.state == State.QUEUED:
# If task instance if up for retry, make sure
if ti.is_runnable():
logging.debug(
'Starting previously queued : ' + str(ti))
executor.queue_task_instance(ti)
# If was queued we skipped so that in gets prioritized
# in self.prioritize_queued
continue
else:
# Trying to run the next schedule
next_schedule = (