Skip to content

Commit

Permalink
Convert retry-after header string to seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
ruionweb committed Apr 18, 2024
1 parent c945b99 commit 139b1c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/jobs/shipit/background_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class << self
retry_on(Octokit::BadGateway, Octokit::InternalServerError)

rescue_from(Octokit::TooManyRequests, Octokit::AbuseDetected) do |exception|
retry_job wait: exception.response_headers.fetch("Retry-After", DEFAULT_RETRY_TIME_IN_SECONDS)
retry_job wait: exception.response_headers.fetch("Retry-After", DEFAULT_RETRY_TIME_IN_SECONDS).to_i.seconds
end

def perform(*)
Expand Down

0 comments on commit 139b1c3

Please sign in to comment.