mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 01:47:35 -02:30
lint
This commit is contained in:
@@ -3126,7 +3126,7 @@ class AWXReceptorJob:
|
|||||||
unit_status = receptor_ctl.simple_command(f'work status {self.unit_id}')
|
unit_status = receptor_ctl.simple_command(f'work status {self.unit_id}')
|
||||||
detail = unit_status.get('Detail', None)
|
detail = unit_status.get('Detail', None)
|
||||||
state_name = unit_status.get('StateName', None)
|
state_name = unit_status.get('StateName', None)
|
||||||
except RuntimeError as e:
|
except RuntimeError:
|
||||||
detail = ''
|
detail = ''
|
||||||
state_name = ''
|
state_name = ''
|
||||||
logger.exception(f'Unable to retrieve work status for {self.unit_id}')
|
logger.exception(f'Unable to retrieve work status for {self.unit_id}')
|
||||||
@@ -3228,8 +3228,8 @@ class AWXReceptorJob:
|
|||||||
|
|
||||||
# cancel job if receptor no longer knows about work item
|
# cancel job if receptor no longer knows about work item
|
||||||
try:
|
try:
|
||||||
unit_status = receptor_ctl.simple_command(f'work status {self.unit_id}')
|
receptor_ctl.simple_command(f'work status {self.unit_id}')
|
||||||
except RuntimeError as e:
|
except RuntimeError:
|
||||||
self.task.instance.result_traceback = traceback.format_exc()
|
self.task.instance.result_traceback = traceback.format_exc()
|
||||||
self.task.instance.save(update_fields=['result_traceback'])
|
self.task.instance.save(update_fields=['result_traceback'])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user