diff options
author | Eugen <eugen@zeonfederated.com> | 2017-01-17 18:46:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-17 18:46:53 +0100 |
commit | d7a7baa9a7f6b44a3c0b7232e909e456c9231543 (patch) | |
tree | 7bab737c8ed6b113e213ba7334d28b6c9855a781 /config/puma.rb | |
parent | 6cf44ca92c3b92df5bda32adb59258104f1ac9c5 (diff) | |
parent | ab4f5f5da5229bbc33f3c86815eaf1e057c697b1 (diff) |
Merge pull request #489 from ineffyble/master
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 |