diff --git a/awx/main/tasks.py b/awx/main/tasks.py index 90b5672241..9ea2447126 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -3071,7 +3071,10 @@ class AWXReceptorJob: finally: # Make sure to always release the work unit if we established it if self.unit_id is not None and settings.RECEPTOR_RELEASE_WORK: - receptor_ctl.simple_command(f"work release {self.unit_id}") + try: + receptor_ctl.simple_command(f"work release {self.unit_id}") + except Exception as e: + logger.exception(e) @property def sign_work(self): @@ -3128,7 +3131,7 @@ class AWXReceptorJob: unit_status = receptor_ctl.simple_command(f'work status {self.unit_id}') detail = unit_status.get('Detail', None) state_name = unit_status.get('StateName', None) - except RuntimeError as e: + except Exception as e: detail = '' state_name = '' logger.exception(e)