mirror of
https://github.com/ansible/awx.git
synced 2026-03-19 18:07:33 -02:30
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user