Skip to content

Commit

Permalink
feature: add failed scope to job
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianthedev authored and rosa committed Dec 22, 2023
1 parent d9d6b54 commit 59dcb48
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/models/solid_queue/job/executable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module Executable
after_create :prepare_for_execution

scope :finished, -> { where.not(finished_at: nil) }
scope :failed, -> { includes(:failed_execution).where.not(failed_execution: {id: nil}) }
end

%w[ ready claimed failed scheduled ].each do |status|
Expand Down

0 comments on commit 59dcb48

Please sign in to comment.