forked from e621ng/e621ng
[Prod] Configure sidekiq through env variables
This commit is contained in:
parent
eb8e402152
commit
7bb412c608
2
Procfile
2
Procfile
@ -1,4 +1,4 @@
|
||||
server: bin/rails server -p 9000 -b 0.0.0.0
|
||||
# server: bundle exec unicorn -c config/unicorn/development.rb
|
||||
jobs: bundle exec sidekiq -c 1 -q low_prio -q tags -q default -q high_prio -q video
|
||||
jobs: SIDEKIQ_QUEUES="low_prio:1;tags:2;default:3;high_prio:5" bundle exec sidekiq
|
||||
cron: run-parts /etc/periodic/daily && crond -f
|
||||
|
@ -1,6 +1,5 @@
|
||||
---
|
||||
:verbose: false
|
||||
:concurrency: 5
|
||||
|
||||
# Set timeout to 8 on Heroku, longer if you manage your own systems.
|
||||
:timeout: 30
|
||||
@ -9,11 +8,8 @@
|
||||
# even put in dynamic logic, like a host-specific queue.
|
||||
# http://www.mikeperham.com/2013/11/13/advanced-sidekiq-host-specific-queues/
|
||||
:queues:
|
||||
- [low_prio, 1]
|
||||
- [tags, 2]
|
||||
- [default, 3]
|
||||
- [high_prio, 5]
|
||||
<% ENV.fetch("SIDEKIQ_QUEUES").split(";").map { |e| e.split(":") }.each do |queue, priority| %>
|
||||
- [<%= queue %>, <%= priority %>]
|
||||
<% end %>
|
||||
|
||||
# you can override concurrency based on environment
|
||||
production:
|
||||
:concurrency: 15
|
||||
:concurrency: <%= ENV.fetch("SIDEKIQ_CONCURRENCY", 5) %>
|
||||
|
Loading…
Reference in New Issue
Block a user