From 2d5c021b72e079bca163a7077b172bbad7b22065 Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Thu, 13 Jul 2017 08:24:42 -0400 Subject: [PATCH] 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 --- awx/main/tasks.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index 3ffb46648e..0fcc1d1ba3 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -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: