ruby on rails - Sidekiq worker priority setup -


currently running background jobs using sidekiq. concurrently running 10 jobs @ time. these jobs not small jobs. take 6-8 hours complete work.

in mean time need run smaller jobs(will take 2-3 mins). not able run these jobs until 1 of above 10 jobs complete. need wait 6-8 hours perform small job.

but these jobs should run after adding queue. there option block 1 of process run kind of small jobs. tried queue option not working in scenario.

here sidekiq config

:concurrency: 10 :queues:   - [web, 7]   - [default, 3] 

can 1 give me solution problem?

the long jobs suffocate smaller jobs since fight on same resources.

i can suggest run two sidekiq processes, each using different config file, , each listening different queue:

sidekiq_long.yml:

:concurrency: 10 :queues:   - default 

sidekiq_normal.yml:

:concurrency: 3 :queues:   - web 

this way 1 sidekiq process available server short jobs:

sidekiq -c config/sidekiq_long.yml.yml sidekiq -c config/sidekiq_normal.yml 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -