Skip to content

Commit 59dcb48

Browse files
adrianthedevrosa
authored andcommitted
feature: add failed scope to job
1 parent d9d6b54 commit 59dcb48

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/models/solid_queue/job/executable.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ module Executable
1717
after_create :prepare_for_execution
1818

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

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

0 commit comments

Comments
 (0)