mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 18:09:57 -03:30
Fix error with CLI monitor of ad hoc output (#15642)
This commit is contained in:
parent
3dbcfb138c
commit
d26396ce74
@ -72,13 +72,11 @@ class Launchable(object):
|
||||
def monitor(self, response, **kwargs):
|
||||
mon = monitor_workflow if response.type == 'workflow_job' else monitor
|
||||
if kwargs.get('monitor') or kwargs.get('wait'):
|
||||
status = mon(
|
||||
response,
|
||||
self.page.connection.session,
|
||||
print_stdout=not kwargs.get('wait'),
|
||||
action_timeout=kwargs.get('action_timeout'),
|
||||
interval=kwargs.get('interval'),
|
||||
)
|
||||
monitor_kwargs = {'print_stdout': bool(not kwargs.get('wait'))}
|
||||
for key in ('action_timeout', 'interval'):
|
||||
if key in kwargs:
|
||||
monitor_kwargs[key] = kwargs[key]
|
||||
status = mon(response, self.page.connection.session, **monitor_kwargs)
|
||||
if status:
|
||||
response.json['status'] = status
|
||||
if status in ('failed', 'error'):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user