Skip to content

Commit

Permalink
Prevent nil pointing error
Browse files Browse the repository at this point in the history
  • Loading branch information
tawan committed Nov 20, 2017
1 parent 7c89f56 commit 9e95a2f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/active_elastic_job/railtie.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
module ActiveElasticJob
class Railtie < Rails::Railtie
config.active_elastic_job = ActiveSupport::OrderedOptions.new
config.active_elastic_job.process_jobs = ENV['PROCESS_ACTIVE_ELASTIC_JOBS'].downcase == 'true'
process_active_elastic_jobs = ENV['PROCESS_ACTIVE_ELASTIC_JOBS']
config.active_elastic_job.process_jobs = !process_active_elastic_jobs.nil? && process_active_elastic_jobs.downcase == 'true'
config.active_elastic_job.aws_credentials = lambda { Aws::InstanceProfileCredentials.new }
config.active_elastic_job.periodic_tasks_route = '/periodic_tasks'.freeze

Expand Down

0 comments on commit 9e95a2f

Please sign in to comment.