mirror of
https://github.com/ansible/awx.git
synced 2026-03-27 05:45:02 -02:30
Update error messages for when exceptions are caught
This commit is contained in:
committed by
Shane McDonald
parent
d79da1ef9f
commit
8275082896
@@ -3073,8 +3073,8 @@ class AWXReceptorJob:
|
|||||||
if self.unit_id is not None and settings.RECEPTOR_RELEASE_WORK:
|
if self.unit_id is not None and settings.RECEPTOR_RELEASE_WORK:
|
||||||
try:
|
try:
|
||||||
receptor_ctl.simple_command(f"work release {self.unit_id}")
|
receptor_ctl.simple_command(f"work release {self.unit_id}")
|
||||||
except Exception as e:
|
except Exception:
|
||||||
logger.exception(e)
|
logger.exception(f"Error releasing work unit {self.unit_id}.")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def sign_work(self):
|
def sign_work(self):
|
||||||
@@ -3131,10 +3131,10 @@ 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 Exception as e:
|
except Exception:
|
||||||
detail = ''
|
detail = ''
|
||||||
state_name = ''
|
state_name = ''
|
||||||
logger.exception(e)
|
logger.exception(f'An error was encountered while canceling work unit {self.unit_id}')
|
||||||
|
|
||||||
if 'exceeded quota' in detail:
|
if 'exceeded quota' in detail:
|
||||||
logger.warn(detail)
|
logger.warn(detail)
|
||||||
|
|||||||
Reference in New Issue
Block a user