-
-
Notifications
You must be signed in to change notification settings - Fork 512
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add report_after_job_retries support for activejob
- Loading branch information
Showing
3 changed files
with
59 additions
and
8 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
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,23 @@ | ||
module Sentry | ||
class Configuration | ||
attr_reader :active_job | ||
|
||
add_post_initialization_callback do | ||
@active_job = Sentry::Rails::ActiveJob::Configuration.new | ||
end | ||
end | ||
|
||
module Rails | ||
module ActiveJob | ||
class Configuration | ||
# Set this option to true if you want Sentry to only capture the last job | ||
# retry if it fails. | ||
attr_accessor :report_after_job_retries | ||
|
||
def initialize | ||
@report_after_job_retries = false | ||
end | ||
end | ||
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