From c6bf3e79342a68e217a1a26440fe218cf77adccc Mon Sep 17 00:00:00 2001 From: evazion Date: Mon, 20 Sep 2021 16:33:23 -0500 Subject: [PATCH] BURs: don't automatically retry failed BURs. If a bulk update job fails, don't automatically retry it. Retrying it will clobber the original error message if it fails again. --- app/jobs/bigquery_export_job.rb | 5 +++++ app/jobs/discord_notification_job.rb | 5 +++++ app/jobs/process_bulk_update_request_job.rb | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/app/jobs/bigquery_export_job.rb b/app/jobs/bigquery_export_job.rb index 8e458b49c..8add5f928 100644 --- a/app/jobs/bigquery_export_job.rb +++ b/app/jobs/bigquery_export_job.rb @@ -5,6 +5,11 @@ class BigqueryExportJob < ApplicationJob retry_on Exception, attempts: 0 + # XXX delayed_job specific + def max_attempts + 1 + end + def perform(model:, **options) BigqueryExportService.new(model, **options).export! end diff --git a/app/jobs/discord_notification_job.rb b/app/jobs/discord_notification_job.rb index 4f17a2191..3b9edc1be 100644 --- a/app/jobs/discord_notification_job.rb +++ b/app/jobs/discord_notification_job.rb @@ -3,6 +3,11 @@ class DiscordNotificationJob < ApplicationJob retry_on Exception, attempts: 0 + # XXX delayed_job specific + def max_attempts + 1 + end + def perform(forum_post:) forum_post.send_discord_notification end diff --git a/app/jobs/process_bulk_update_request_job.rb b/app/jobs/process_bulk_update_request_job.rb index 19f46b9bc..6e1f05785 100644 --- a/app/jobs/process_bulk_update_request_job.rb +++ b/app/jobs/process_bulk_update_request_job.rb @@ -5,6 +5,11 @@ class ProcessBulkUpdateRequestJob < ApplicationJob retry_on Exception, attempts: 0 + # XXX delayed_job specific + def max_attempts + 1 + end + def perform(bulk_update_request) bulk_update_request.processor.process! end