From 139b1c3b5343a3c9740c4d7f903f28063061d243 Mon Sep 17 00:00:00 2001 From: Ruidan Date: Thu, 18 Apr 2024 11:22:57 -0400 Subject: [PATCH] Convert retry-after header string to seconds --- app/jobs/shipit/background_job.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/jobs/shipit/background_job.rb b/app/jobs/shipit/background_job.rb index eb86c8850..f4c0a0718 100644 --- a/app/jobs/shipit/background_job.rb +++ b/app/jobs/shipit/background_job.rb @@ -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(*)