0
0
Fork 0

Add Heroku deployment support

This commit is contained in:
Effy Elden 2017-01-17 22:00:03 +11:00
parent 6cf44ca92c
commit ab4f5f5da5
8 changed files with 126 additions and 4 deletions

View file

@ -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