Skip to Content
Menu
This question has been flagged
4 Replies
7618 Views

I'm using queue job module.

Link given below

https://apps.odoo.com/apps/modules/13.0/queue_job/


Is there any way I can process jobs simultaneously. 

At the moment I have to wait for previous job to complete 1st & then next job start.


My issue is 1st job takes 5mins to complete & 2nd job may take few seconds to complete. 


If iam able to run both jobs together I have required output in few seconds. 

Avatar
Discard
Author

Found the solution , Under conf file define root:4 OR root:4,root.sub:2

Author Best Answer

@jignesh shah.

I don't have enough karma to comment on ur post.

But queue jobs can run parallel by configuring below parameters in .conf file


root:4
OR
root:4,root.sub:2

Solutions given in queue job documentation. 

Avatar
Discard
Best Answer

Hello Shashank,

Two queue jobs can not run parallely. It is a default behaviour that process will start after previous job is completed(done or failed)


You can define priority to job and delay time as follow

delayable = self.env['model'].with_delay(priority=30, eta=60*60*5)


=> It means the job will be executed with a low priority and not before a delay of 5 hours from now


Regards,




Email:   odoo@aktivsoftware.com

Skype: kalpeshmaheshwari

   

Avatar
Discard