changeset 1db88b7f7d4b in trytond:5.0
details: https://hg.tryton.org/trytond?cmd=changeset&node=1db88b7f7d4b
description:
        Start Pool before starting threads for cron and worker

        issue10704
        review346881064
        (grafted from 659db305fa55228d27a6e1defb205cdf0c3aaef3)
diffstat:

 bin/trytond-cron   |  2 ++
 bin/trytond-worker |  2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diffs (28 lines):

diff -r b97cb274358c -r 1db88b7f7d4b bin/trytond-cron
--- a/bin/trytond-cron  Thu Sep 02 23:10:33 2021 +0200
+++ b/bin/trytond-cron  Fri Sep 10 19:11:45 2021 +0200
@@ -19,9 +19,11 @@
 commandline.config_log(options)
 
 # Import after application is configured
+from trytond.pool import Pool
 import trytond.cron as cron
 
 with commandline.pidfile(options):
+    Pool.start()
     while True:
         cron.run(options)
         time.sleep(60)
diff -r b97cb274358c -r 1db88b7f7d4b bin/trytond-worker
--- a/bin/trytond-worker        Thu Sep 02 23:10:33 2021 +0200
+++ b/bin/trytond-worker        Fri Sep 10 19:11:45 2021 +0200
@@ -18,7 +18,9 @@
 commandline.config_log(options)
 
 # Import after application is configured
+from trytond.pool import Pool
 import trytond.worker as worker
 
 with commandline.pidfile(options):
+    Pool.start()
     worker.work(options)

Reply via email to