-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quiet job continuation #1133
base: main
Are you sure you want to change the base?
Quiet job continuation #1133
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
had a few questions!
app/jobs/publish_feed_job.rb
Outdated
when "rss" then [:error_rss!, :warn, true] | ||
when "apple_timeout" | ||
level = apple_timeout_log_level(error) | ||
[:retry!, level, level == :fatal || level == :error] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might refactor to %i[error fatal].include?(level)
, but this makes sense as the place to decide to raise the error or not.
Another question that's not a request for change - does it feel like this is info I wish was on the error
somehow, like how the error has a log level, can it also have a raise or not? maybe that is not a good responsibility for the error, idk.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re: clarity, Good point!
Re: error interface responsibility. Hrm, yes, I see what you're getting at. In essence, we're already responding to the error as the controlling parameter here, so why not push that should_raise?
responsibility up to the error class itself...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, those changes to raise logic make sense to me (and removing some code too!)
After #1116 and #1122
Quietly retry apple jobs and send alerts (error+fatal log lines) in the case of long waits