@@ -416,9 +416,7 @@ class Agent < ActiveRecord::Base |
||
416 | 416 |
# per type of agent, so you can override this to define custom bulk check behavior for your custom Agent type. |
417 | 417 |
def bulk_check(schedule) |
418 | 418 |
raise "Call #bulk_check on the appropriate subclass of Agent" if self == Agent |
419 |
- agent_ids = where("agents.schedule = ? and disabled = false", schedule).pluck("agents.id") |
|
420 |
- Rails.logger.info "Calling bulk_check(#{schedule}) on #{agent_ids}" |
|
421 |
- agent_ids.each do |agent_id| |
|
419 |
+ where("agents.schedule = ? and disabled = false", schedule).pluck("agents.id").each do |agent_id| |
|
422 | 420 |
async_check(agent_id) |
423 | 421 |
end |
424 | 422 |
end |
@@ -6,7 +6,8 @@ Delayed::Worker.default_priority = 10 |
||
6 | 6 |
Delayed::Worker.delay_jobs = !Rails.env.test? |
7 | 7 |
Delayed::Worker.sleep_delay = (ENV['DELAYED_JOB_SLEEP_DELAY'].presence || 10).to_f |
8 | 8 |
|
9 |
-Delayed::Worker.logger = Rails.logger |
|
9 |
+# Delayed::Worker.logger = Logger.new(Rails.root.join('log', 'delayed_job.log')) |
|
10 |
+# Delayed::Worker.logger.level = Logger::DEBUG |
|
10 | 11 |
|
11 | 12 |
class Delayed::Job |
12 | 13 |
scope :pending, ->{ where("locked_at IS NULL AND attempts = 0") } |