mirror of
https://github.com/NaN-tic/trytond-patches.git
synced 2023-12-14 06:03:03 +01:00
parent
d1137b26a0
commit
c30bdc5795
2 changed files with 25 additions and 0 deletions
23
issue11913.diff
Normal file
23
issue11913.diff
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
diff --git a/trytond/trytond/worker.py b/trytond/trytond/worker.py
|
||||||
|
index d9777c53..b1ed119c 100644
|
||||||
|
--- a/trytond/trytond/worker.py
|
||||||
|
+++ b/trytond/trytond/worker.py
|
||||||
|
@@ -62,15 +62,15 @@ def work(options):
|
||||||
|
queues = [Queue(name, mpool) for name in options.database_names]
|
||||||
|
|
||||||
|
tasks = TaskList()
|
||||||
|
- timeout = options.timeout
|
||||||
|
try:
|
||||||
|
while True:
|
||||||
|
+ timeout = options.timeout
|
||||||
|
while len(tasks.filter()) >= processes:
|
||||||
|
time.sleep(0.1)
|
||||||
|
for queue in queues:
|
||||||
|
task_id, next_ = queue.pull(options.name)
|
||||||
|
- timeout = min(
|
||||||
|
- next_ or options.timeout, timeout, options.timeout)
|
||||||
|
+ if next_ is not None:
|
||||||
|
+ timeout = min(next_, timeout)
|
||||||
|
if task_id:
|
||||||
|
tasks.append(queue.run(task_id))
|
||||||
|
break
|
2
series
2
series
|
@ -67,3 +67,5 @@ issue11745.diff # [stock] Moves of internal shipment are not valid when switchin
|
||||||
issue11750.diff # [stock] 'create' method execution frozen or extremly slow
|
issue11750.diff # [stock] 'create' method execution frozen or extremly slow
|
||||||
|
|
||||||
allow_none_list_price.diff # [sale_price_list] allow set none as price list in a sale with tax_included=True product_price_list
|
allow_none_list_price.diff # [sale_price_list] allow set none as price list in a sale with tax_included=True product_price_list
|
||||||
|
|
||||||
|
issue11913.diff # [trytond] Too fast worker loop
|
||||||
|
|
Loading…
Reference in a new issue