diff options
author | Effy Elden <git@effy.is> | 2017-01-17 22:00:03 +1100 |
---|---|---|
committer | Effy Elden <git@effy.is> | 2017-01-17 22:00:03 +1100 |
commit | ab4f5f5da5229bbc33f3c86815eaf1e057c697b1 (patch) | |
tree | 7bab737c8ed6b113e213ba7334d28b6c9855a781 /config/puma.rb | |
parent | 6cf44ca92c3b92df5bda32adb59258104f1ac9c5 (diff) |
Add Heroku deployment support
Diffstat (limited to 'config/puma.rb')
-rw-r--r-- | config/puma.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/config/puma.rb b/config/puma.rb index ad2dbfffd..e6b0da91b 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -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 |