Skip to content

Commit

Permalink
Update railtie.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
rkiller authored Mar 22, 2020
1 parent ba6c9c7 commit ec2ae0b
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions lib/active_elastic_job/railtie.rb
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
module ActiveElasticJob
class Railtie < Rails::Railtie
puts "Statrting ActiveElasticJob"
config.active_elastic_job = ActiveSupport::OrderedOptions.new
config.active_elastic_job.process_jobs = ENV['PROCESS_ACTIVE_ELASTIC_JOBS'] == 'true'
puts "Processing Jobs: " + config.active_elastic_job.process_jobs.to_s
config.active_elastic_job.aws_credentials = lambda { Aws::InstanceProfileCredentials.new }
config.active_elastic_job.aws_region = ENV['AWS_REGION']
puts "Setting Credentials"
config.active_elastic_job.periodic_tasks_route = '/periodic_tasks'.freeze
puts "Route: " + config.active_elastic_job.periodic_tasks_route.to_s

initializer "active_elastic_job.insert_middleware" do |app|
if app.config.active_elastic_job.secret_key_base.blank?
puts "Setting Key Secret"
app.config.active_elastic_job.secret_key_base = app.secrets[:secret_key_base]
end
puts "Checking for process jobs flag..."
if app.config.active_elastic_job.process_jobs == true
puts "Jobs Process Flag was set!"
if app.config.force_ssl
Expand All @@ -26,6 +21,5 @@ class Railtie < Rails::Railtie
end
end
end
puts "Finishing Active Elastic Job Setup"
end
end

0 comments on commit ec2ae0b

Please sign in to comment.