16 lines
585 B
Diff
16 lines
585 B
Diff
--- a/tryton/trytond/trytond/worker.py
|
|
+++ b/tryton/trytond/trytond/worker.py
|
|
@@ -73,7 +73,10 @@ def work(options):
|
|
while len(tasks.filter()) >= processes:
|
|
time.sleep(0.1)
|
|
for queue in queues:
|
|
- task_id, next_ = queue.pull(options.name)
|
|
+ try:
|
|
+ task_id, next_ = queue.pull(options.name)
|
|
+ except backend.DatabaseOperationalError:
|
|
+ break
|
|
if next_ is not None:
|
|
timeout = min(next_, timeout)
|
|
if task_id:
|
|
|