You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running locally, for some reason the queue is processed, if --worker 0 is set. On odoo.sh it doesn't work.
Does someone know why it might work locally? Thanks!
2020-07-01 11:07:23,190 289 INFO ? odoo.addons.queue_job.jobrunner.runner: starting
2020-07-01 11:07:23,190 289 INFO ? odoo.addons.queue_job.jobrunner.runner: initializing database connections
2020-07-01 11:07:23,206 289 INFO ? odoo.addons.queue_job.jobrunner.runner: queue job runner ready for db xxx
2020-07-01 11:07:23,207 289 INFO ? odoo.addons.queue_job.jobrunner.runner: database connections read
On queuing a job:
2020-07-01 11:07:23,207 289 INFO ? odoo.addons.queue_job.jobrunner.runner: asking Odoo to run job 1519880e-cc68-42da-9b88-26b1072187e4 on db xxx
2020-07-01 11:07:23,209 289 INFO ? odoo.addons.queue_job.jobrunner.runner: obtaining an anonymous session for the job runner
The job is then set to pending and never changes state, except on restart, it gets set to enqueued.
I'm gonna ask odoo support and ask in the other thread, as well.
Thank you for contacting Odoo Support.
There is a specific cron management on Odoo.sh and third-party modules such as queue_job are generally incompatible with it. https://www.odoo.com/documentation/user/13.0/odoo_sh/advanced/frequent_technical_questions.html
In particular, due to the nature of the Odoo.sh platform, this module won’t work well: the platform is designed to pause services on idle traffic. This is also is why we have separate workers for the crons.
Moreover, Odoo.sh does not support daemons either long-living processes, so your job queue could be interrupted at any time. As the module is not designed to be fault-tolerant, you will for sure encounter problems.
For these reasons, we do not advise our users to use this module on Odoo.sh.
I'm not sure that's correct. There is indeed currently an issue described in #169 (comment), which should be solved by #256. But this:
As the module is not designed to be fault-tolerant, you will for sure encounter problems.
It's not totally accurate, as we have a cron that requeue jobs stucked in the state enqueued.
so your job queue could be interrupted at any time
If the job is already started, it is handled by a normal worker, which will not be interrupted (otherwise, http requests from users could be interrupted too). Also, as the services are paused when the traffic is idle, it means it will be stopped when the queue has finish to process its queue. A case that may give unexpected results is if we have a job with an eta (estimated time of arrival), which may start only when the workers stop to be idle and the jobrunner restarts (but eta is not meant to give a precise time of execution anyway, only a "not before x").
2020-07-01 11:07:23,190 289 INFO ? odoo.addons.queue_job.jobrunner.runner: starting
2020-07-01 11:07:23,190 289 INFO ? odoo.addons.queue_job.jobrunner.runner: initializing database connections
2020-07-01 11:07:23,206 289 INFO ? odoo.addons.queue_job.jobrunner.runner: queue job runner ready for db xxx
2020-07-01 11:07:23,207 289 INFO ? odoo.addons.queue_job.jobrunner.runner: database connections read
On queuing a job:
2020-07-01 11:07:23,207 289 INFO ? odoo.addons.queue_job.jobrunner.runner: asking Odoo to run job 1519880e-cc68-42da-9b88-26b1072187e4 on db xxx
2020-07-01 11:07:23,209 289 INFO ? odoo.addons.queue_job.jobrunner.runner: obtaining an anonymous session for the job runner
The job is then set to pending and never changes state, except on restart, it gets set to enqueued.
I'm gonna ask odoo support and ask in the other thread, as well.
How did you restart your odoo instance on Odoo.sh ?
Activity
[-]Are multiple workers actually required?[/-][+]Queue works locally with 0 workers.[/+]guewen commentedon Jun 29, 2020
What configuration parameters do you use? Did you add
queue_jobin--loadorSERVER_WIDE_MODULES?guewen commentedon Jun 29, 2020
Someone reported they could make it work on odoo.sh: #169
NMisko commentedon Jul 1, 2020
My configuration file:
On restart I get the following in the logs:
On queuing a job:
The job is then set to
pendingand never changes state, except on restart, it gets set toenqueued.I'm gonna ask odoo support and ask in the other thread, as well.
[-]Queue works locally with 0 workers.[/-][+]Jobs stuck in pending in odoo.sh.[/+]NMisko commentedon Jul 7, 2020
Odoo support response:
-> Not advised to use on Odoo.sh
guewen commentedon Oct 9, 2020
-> Not advised to use on Odoo.sh
I'm not sure that's correct. There is indeed currently an issue described in #169 (comment), which should be solved by #256. But this:
It's not totally accurate, as we have a cron that requeue jobs stucked in the state
enqueued.If the job is already started, it is handled by a normal worker, which will not be interrupted (otherwise, http requests from users could be interrupted too). Also, as the services are paused when the traffic is idle, it means it will be stopped when the queue has finish to process its queue. A case that may give unexpected results is if we have a job with an
eta(estimated time of arrival), which may start only when the workers stop to be idle and the jobrunner restarts (butetais not meant to give a precise time of execution anyway, only a "not before x").itpetarabia commentedon Nov 24, 2022
How did you restart your odoo instance on Odoo.sh ?
guewen commentedon Nov 24, 2022
The job runner will not work on odoo.sh
You can use the module queue_job_cron_jobrunner that uses a Cron to enqueued jobs. Not all features are supported though https://github.com/OCA/queue/tree/16.0/queue_job_cron_jobrunner