Namechange events_processed -> event_processing_finished

from PR review, also adding tests to assert that the
value is passed from the stdout_handle to the UnifiedJob
object on finalization of job run in tasks.py
This commit is contained in:
AlanCoding
2018-03-13 15:46:35 -04:00
parent b803a6e557
commit 04a27d5b4d
4 changed files with 17 additions and 8 deletions

View File

@@ -145,7 +145,7 @@ class UnifiedJobDeletionMixin(object):
# Still allow deletion of new status, because these can be manually created
if obj.status in ACTIVE_STATES and obj.status != 'new':
raise PermissionDenied(detail=_("Cannot delete running job resource."))
elif not obj.events_processed:
elif not obj.event_processing_finished:
# Prohibit deletion if job events are still coming in
if obj.finished and now() < obj.finished + dateutil.relativedelta.relativedelta(minutes=1):
# less than 1 minute has passed since job finished and events are not in