mirror of
https://github.com/Fishwaldo/huginn.git
synced 2025-03-15 19:31:26 +00:00
Merge pull request #1889 from dsander/rename-scope
Rename Delayed::Job failed scope to prevent warning
This commit is contained in:
commit
77842eae64
2 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,7 @@ class WorkerStatusController < ApplicationController
|
|||
render json: {
|
||||
pending: Delayed::Job.pending.where("run_at <= ?", start).count,
|
||||
awaiting_retry: Delayed::Job.awaiting_retry.count,
|
||||
recent_failures: Delayed::Job.failed.where('failed_at > ?', 5.days.ago).count,
|
||||
recent_failures: Delayed::Job.failed_jobs.where('failed_at > ?', 5.days.ago).count,
|
||||
event_count: count,
|
||||
max_id: max_id || 0,
|
||||
events_url: events_url,
|
||||
|
|
|
@ -14,7 +14,7 @@ ActiveSupport.on_load(:delayed_job_active_record) do
|
|||
class Delayed::Job
|
||||
scope :pending, -> { where("locked_at IS NULL AND attempts = 0") }
|
||||
scope :awaiting_retry, -> { where("failed_at IS NULL AND attempts > 0 AND locked_at IS NULL") }
|
||||
scope :failed, -> { where("failed_at IS NOT NULL") }
|
||||
scope :failed_jobs, -> { where("failed_at IS NOT NULL") }
|
||||
end
|
||||
|
||||
database_deadlocks_when_using_optimized_strategy = lambda do
|
||||
|
|
Loading…
Add table
Reference in a new issue