mirror of
https://github.com/ansible/awx.git
synced 2026-01-20 14:11:24 -03:30
cli: set non-zero return code for canceled status (#15678)
This commit is contained in:
parent
fb4879b2c9
commit
de4a971cb3
@ -81,6 +81,8 @@ class Launchable(object):
|
||||
response.json['status'] = status
|
||||
if status in ('failed', 'error'):
|
||||
setattr(response, 'rc', 1)
|
||||
if status in ('canceled'):
|
||||
setattr(response, 'rc', 2)
|
||||
return response
|
||||
|
||||
def perform(self, **kwargs):
|
||||
@ -561,6 +563,8 @@ class HasMonitor(object):
|
||||
response.json['status'] = status
|
||||
if status in ('failed', 'error'):
|
||||
setattr(response, 'rc', 1)
|
||||
if status in ('canceled'):
|
||||
setattr(response, 'rc', 2)
|
||||
else:
|
||||
return 'Unable to monitor finished job'
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user