From 364980ed20dd70b496c7e1d7e95ac04c56071303 Mon Sep 17 00:00:00 2001 From: Briana Roberts Date: Tue, 27 Jan 2026 17:09:04 -0800 Subject: [PATCH] Discard jobs where the record cannot be found --- app/jobs/shipit/background_job.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/jobs/shipit/background_job.rb b/app/jobs/shipit/background_job.rb index cef3c3cff..42f6fa478 100644 --- a/app/jobs/shipit/background_job.rb +++ b/app/jobs/shipit/background_job.rb @@ -8,6 +8,9 @@ class << self DEFAULT_RETRY_TIME_IN_SECONDS = 30 + # If the record was deleted before the job ran, there's nothing to do + discard_on(ActiveRecord::RecordNotFound) + # Write actions can sometimes fail intermittently, particulary for large and/or busy repositories retry_on(Octokit::ServerError)