Skip to content

Commit

Permalink
More puts
Browse files Browse the repository at this point in the history
  • Loading branch information
rkiller committed Mar 6, 2017
1 parent a059982 commit 342eb34
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Binary file modified lib/active_elastic_job/.railtie.rb.un~
Binary file not shown.
4 changes: 2 additions & 2 deletions lib/active_elastic_job/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ 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
puts "Processing Jobs: " + config.active_elastic_job.process_jobs.to_s
config.active_elastic_job.aws_credentials = lambda { Aws::InstanceProfileCredentials.new }
puts "Setting Credentials"
config.active_elastic_job.periodic_tasks_route = '/periodic_tasks'.freeze
puts "Route: " + config.active_elastic_job.periodic_tasks_route
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?
Expand Down
6 changes: 5 additions & 1 deletion lib/active_elastic_job/railtie.rb~
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,20 @@ module ActiveElasticJob

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
puts "Force SSL"
app.config.middleware.insert_before(ActionDispatch::SSL,ActiveElasticJob::Rack::SqsMessageConsumer)
else
app.config.middleware.use(ActiveElasticJob::Rack::SqsMessageConsumer)
end
end
end
puts "Finishing Active Elastic Job Setup"
end
end

0 comments on commit 342eb34

Please sign in to comment.