Add Heroku deployment support
This commit is contained in:
parent
6cf44ca92c
commit
ab4f5f5da5
8 changed files with 126 additions and 4 deletions
|
@ -40,6 +40,11 @@ preload_app!
|
|||
# cannot share connections between processes.
|
||||
#
|
||||
on_worker_boot do
|
||||
|
||||
if ENV["HEROKU"] #Spwan the workers from Puma, to only use one dyno
|
||||
@sidekiq_pid ||= spawn('bundle exec sidekiq -q default -q mailers -q push')
|
||||
end
|
||||
|
||||
ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue