mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 01:17:37 -02:30
Make status command in error handling cleaner (#10823)
This commit is contained in:
@@ -3071,10 +3071,9 @@ class AWXReceptorJob:
|
|||||||
resultsock.shutdown(socket.SHUT_RDWR)
|
resultsock.shutdown(socket.SHUT_RDWR)
|
||||||
resultfile.close()
|
resultfile.close()
|
||||||
elif res.status == 'error':
|
elif res.status == 'error':
|
||||||
# TODO: There should be a more efficient way of getting this information
|
unit_status = receptor_ctl.simple_command(f'work status {self.unit_id}')
|
||||||
receptor_work_list = receptor_ctl.simple_command("work list")
|
detail = unit_status['Detail']
|
||||||
detail = receptor_work_list[self.unit_id]['Detail']
|
state_name = unit_status['StateName']
|
||||||
state_name = receptor_work_list[self.unit_id]['StateName']
|
|
||||||
|
|
||||||
if 'exceeded quota' in detail:
|
if 'exceeded quota' in detail:
|
||||||
logger.warn(detail)
|
logger.warn(detail)
|
||||||
|
|||||||
Reference in New Issue
Block a user