From 7adf5c9011a283f8f8b108d36fc7d4cfdc98bcc8 Mon Sep 17 00:00:00 2001 From: luciajanikova <19lucia99@gmail.com> Date: Sat, 16 Nov 2024 19:13:02 +0100 Subject: [PATCH] Do not retry on Submission Error --- app/jobs/govbox/submit_message_draft_job.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/jobs/govbox/submit_message_draft_job.rb b/app/jobs/govbox/submit_message_draft_job.rb index d265b841..e24248ee 100644 --- a/app/jobs/govbox/submit_message_draft_job.rb +++ b/app/jobs/govbox/submit_message_draft_job.rb @@ -7,6 +7,10 @@ class TemporarySubmissionError < SubmissionError retry_on TemporarySubmissionError, wait: 2.minutes, attempts: 5 + retry_on SubmissionError, attempts: 1 do |_job, _error| + # no-op + end + def perform(message_draft, bulk_submit: false, upvs_client: UpvsEnvironment.upvs_client) raise "Invalid message!" unless message_draft.valid?(:validate_data)