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