-
-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create error_event column to track the context of an error (discarded…
…, retried, retry_stopped, etc)
- Loading branch information
1 parent
014b535
commit 47caefd
Showing
28 changed files
with
395 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# frozen_string_literal: true | ||
module GoodJob | ||
# Shared methods for filtering Execution/Job records from the +good_jobs+ table. | ||
module ErrorEvents | ||
extend ActiveSupport::Concern | ||
|
||
ERROR_EVENTS = [ | ||
ERROR_EVENT_INTERRUPTED = 'interrupted', | ||
ERROR_EVENT_UNHANDLED = 'unhandled', | ||
ERROR_EVENT_HANDLED = 'handled', | ||
ERROR_EVENT_RETRIED = 'retried', | ||
ERROR_EVENT_RETRY_STOPPED = 'retry_stopped', | ||
ERROR_EVENT_DISCARDED = 'discarded', | ||
].freeze | ||
|
||
included do | ||
enum error_event: { | ||
ERROR_EVENT_INTERRUPTED => 0, | ||
ERROR_EVENT_UNHANDLED => 1, | ||
ERROR_EVENT_HANDLED => 2, | ||
ERROR_EVENT_RETRIED => 3, | ||
ERROR_EVENT_RETRY_STOPPED => 4, | ||
ERROR_EVENT_DISCARDED => 5, | ||
}.freeze, _prefix: :error_event | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.