about summary refs log tree commit diff
path: root/config/puma.rb
diff options
context:
space:
mode:
Diffstat (limited to 'config/puma.rb')
-rw-r--r--config/puma.rb5
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