Skip to content

Commit

Permalink
Wait on Delayed::Worker.logger change
Browse files Browse the repository at this point in the history
  • Loading branch information
cantino committed Oct 4, 2015
1 parent 2d72e18 commit dc5c378
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions config/initializers/delayed_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
Delayed::Worker.delay_jobs = !Rails.env.test?
Delayed::Worker.sleep_delay = (ENV['DELAYED_JOB_SLEEP_DELAY'].presence || 10).to_f

Delayed::Worker.logger = Logger.new(STDOUT)
Delayed::Worker.logger.level = Logger::WARN
# Delayed::Worker.logger = Logger.new(Rails.root.join('log', 'delayed_job.log'))
# Delayed::Worker.logger.level = Logger::DEBUG

class Delayed::Job
scope :pending, ->{ where("locked_at IS NULL AND attempts = 0") }
Expand All @@ -17,4 +17,4 @@ class Delayed::Job

Delayed::Backend::ActiveRecord.configure do |config|
config.reserve_sql_strategy = :default_sql
end
end

0 comments on commit dc5c378

Please sign in to comment.