1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

log task failures when DEBUG = True

this helps a lot for development - otherwise you have to go look an
explanaton in the database for these sorts of failures
This commit is contained in:
Ryan Petrello 2017-07-13 08:24:42 -04:00
parent bc869284f7
commit 2d5c021b72

View File

@ -769,6 +769,8 @@ class BaseTask(Task):
except Exception:
if status != 'canceled':
tb = traceback.format_exc()
if settings.DEBUG:
logger.exception('exception occurred while running task')
finally:
if kwargs.get('private_data_dir', ''):
try: