mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 02:50:02 -03:30
Resolve can_start from the client side and the signaler side
This commit is contained in:
parent
6941d89502
commit
af231cc8b7
@ -237,6 +237,7 @@ def process_graph(graph, task_capacity):
|
||||
if not start_status:
|
||||
node_obj.status = 'failed'
|
||||
node_obj.result_traceback += "Task failed pre-start check"
|
||||
node_obj.save()
|
||||
# TODO: Run error handler
|
||||
continue
|
||||
remaining_volume -= impact
|
||||
|
||||
@ -370,7 +370,7 @@ class CommonTask(PrimordialModel):
|
||||
|
||||
@property
|
||||
def can_start(self):
|
||||
return bool(self.status == 'new')
|
||||
return bool(self.status in ('new', 'waiting'))
|
||||
|
||||
@property
|
||||
def task_impact(self):
|
||||
@ -397,7 +397,7 @@ class CommonTask(PrimordialModel):
|
||||
|
||||
def start(self, error_callback, **kwargs):
|
||||
task_class = self._get_task_class()
|
||||
if not self.can_start:
|
||||
if not self.status == 'waiting':
|
||||
return False
|
||||
needed = self._get_passwords_needed_to_start()
|
||||
try:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user