diff --git a/series b/series index 254a9ce..f21502a 100644 --- a/series +++ b/series @@ -27,4 +27,6 @@ issue10464.diff # [currency] Update currency rates fails sao_colors.diff # [sao] Use the same colors as 5.4 version -sao_remove_email.diff # [sao] Removes the email button from the toolbar \ No newline at end of file +sao_remove_email.diff # [sao] Removes the email button from the toolbar + +worker_logger.diff #[trytond] Move exception handling into transaction to keep the database name \ No newline at end of file diff --git a/worker_logger.diff b/worker_logger.diff new file mode 100644 index 0000000..f5937f0 --- /dev/null +++ b/worker_logger.diff @@ -0,0 +1,20 @@ +diff --git a/trytond/worker.py b/trytond/worker.py +index 4088e2b6..46393e92 100644 +--- a/trytond/worker.py ++++ b/trytond/worker.py +@@ -126,6 +126,9 @@ def run_task(pool, task_id): + except (UserError, UserWarning) as e: + Error.log(task, e) + raise ++ except Exception: ++ logger.critical('%s failed', name, exc_info=True) ++ return + logger.info('%s done', name) + except backend.DatabaseOperationalError: + logger.info('%s failed, retrying', name, exc_info=True) +@@ -146,5 +149,3 @@ def run_task(pool, task_id): + 'rescheduling %s failed', name, exc_info=True) + except (UserError, UserWarning): + logger.info('%s failed', name) +- except Exception: +- logger.critical('%s failed', name, exc_info=True)