From ab4f5f5da5229bbc33f3c86815eaf1e057c697b1 Mon Sep 17 00:00:00 2001 From: Effy Elden Date: Tue, 17 Jan 2017 22:00:03 +1100 Subject: Add Heroku deployment support --- config/puma.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'config/puma.rb') 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 -- cgit