just like we fail running tasks fail waiting tasks

* Associate the celery_id with the job at the earliest point possible.
This ensures that a waiting job has a celery id. Thus, we are free to
fail waiting jobs that don't have a celery id.
This commit is contained in:
Chris Meyers
2017-02-24 12:07:04 -05:00
parent 3b489977a0
commit 903d0472f0
4 changed files with 9 additions and 9 deletions

View File

@@ -665,7 +665,7 @@ class BaseTask(Task):
'''
Run the job/task and capture its output.
'''
instance = self.update_model(pk, status='running', celery_task_id='' if self.request.id is None else self.request.id)
instance = self.update_model(pk, status='running')
instance.websocket_emit_status("running")
status, rc, tb = 'error', None, ''