enable sucker punch for heroku (#878)

This commit is contained in:
Devin Howard 2016-10-29 23:38:17 +08:00 committed by GitHub
parent 5e0e44b436
commit b9190233b1
3 changed files with 9 additions and 1 deletions

View file

@ -9,6 +9,7 @@ gem 'aws-sdk'
gem 'best_in_place' gem 'best_in_place'
gem 'delayed_job' gem 'delayed_job'
gem 'delayed_job_active_record' gem 'delayed_job_active_record'
gem 'sucker_punch'
gem 'devise' gem 'devise'
gem 'doorkeeper' gem 'doorkeeper'
gem 'dotenv-rails' gem 'dotenv-rails'

View file

@ -244,6 +244,8 @@ GEM
actionpack (>= 4.0) actionpack (>= 4.0)
activesupport (>= 4.0) activesupport (>= 4.0)
sprockets (>= 3.0.0) sprockets (>= 3.0.0)
sucker_punch (2.0.2)
concurrent-ruby (~> 1.0.0)
thor (0.19.1) thor (0.19.1)
thread_safe (0.3.5) thread_safe (0.3.5)
tilt (2.0.5) tilt (2.0.5)
@ -299,6 +301,7 @@ DEPENDENCIES
simplecov simplecov
slack-notifier slack-notifier
snorlax snorlax
sucker_punch
tunemygc tunemygc
uglifier uglifier
@ -306,4 +309,4 @@ RUBY VERSION
ruby 2.3.0p0 ruby 2.3.0p0
BUNDLED WITH BUNDLED WITH
1.13.3 1.13.6

View file

@ -9,6 +9,10 @@ Bundler.require(*Rails.groups)
module Metamaps module Metamaps
class Application < Rails::Application class Application < Rails::Application
config.active_job.queue_adapter = :delayed_job config.active_job.queue_adapter = :delayed_job
if ENV['ACTIVE_JOB_FRAMEWORK'] == 'sucker_punch'
config.active_job.queue_adapter = :sucker_punch
end
# Settings in config/environments/* take precedence over those specified here. # Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers # Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded. # -- all .rb files in that directory are automatically loaded.