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