Add worker_logger.diff | #048235
This commit is contained in:
parent
05bd752356
commit
81db025e8c
4
series
4
series
|
@ -109,4 +109,6 @@ issue10680.diff # [product] Fix get_template in reference field case
|
|||
|
||||
issue10845.diff # [commission] Do not reverse commission when canceling invoice with move
|
||||
|
||||
project_work_company_rule.diff # [project] Add company rule at project level [#048280]
|
||||
project_work_company_rule.diff # [project] Add company rule at project level [#048280]
|
||||
|
||||
worker_logger.diff #[trytond] Move exception handling into transaction to keep the database name
|
|
@ -0,0 +1,20 @@
|
|||
diff --git a/trytond/trytond/worker.py b/trytond/trytond/worker.py
|
||||
index 854d1fc4..3442a97b 100644
|
||||
--- a/trytond/trytond/worker.py
|
||||
+++ b/trytond/trytond/worker.py
|
||||
@@ -120,6 +120,9 @@ def run_task(pool, task_id):
|
||||
transaction.rollback()
|
||||
continue
|
||||
raise
|
||||
+ except Exception:
|
||||
+ logger.critical('task "%d" failed', task_id, exc_info=True)
|
||||
+ return
|
||||
logger.info('task "%d" done', task_id)
|
||||
except DatabaseOperationalError:
|
||||
try:
|
||||
@@ -132,5 +135,3 @@ def run_task(pool, task_id):
|
||||
except Exception:
|
||||
logger.critical(
|
||||
'rescheduling task "%d" failed', task_id, exc_info=True)
|
||||
- except Exception:
|
||||
- logger.critical('task "%d" failed', task_id, exc_info=True)
|
Loading…
Reference in New Issue