Add worker_logger.diff | #048235
This commit is contained in:
parent
5971485497
commit
1899f2cd46
4
series
4
series
|
@ -41,4 +41,6 @@ commission_menu_group.diff # [commission] Creates ir.ui.menu-res.group record fo
|
|||
|
||||
issue10990.diff # [project_invoice] Skip empty efforts on progress migration
|
||||
|
||||
sao_remove_email.diff # [sao] Removes the email button from the toolbar
|
||||
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
|
|
@ -0,0 +1,20 @@
|
|||
diff --git a/trytond/worker.py b/trytond/worker.py
|
||||
index 70f4ba45..99b5a5f7 100644
|
||||
--- a/trytond/worker.py
|
||||
+++ b/trytond/worker.py
|
||||
@@ -121,6 +121,9 @@ def run_task(pool, task_id):
|
||||
transaction.rollback()
|
||||
continue
|
||||
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)
|
||||
@@ -136,5 +139,3 @@ def run_task(pool, task_id):
|
||||
except Exception:
|
||||
logger.critical(
|
||||
'rescheduling %s failed', name, exc_info=True)
|
||||
- except Exception:
|
||||
- logger.critical('%s failed', name, exc_info=True)
|
Loading…
Reference in New Issue