A platform for community discussion. Free, open, simple.
FIX: use `next` instead of `return` in sidekiq_retry_in blocks (#39529)
Joffrey JAFFEUXe2db27a7ba6f
diff --git a/app/jobs/regular/group_smtp_email.rb b/app/jobs/regular/group_smtp_email.rbindex 078606190dc..0d9ac274994 100644--- a/app/jobs/regular/group_smtp_email.rb+++ b/app/jobs/regular/group_smtp_email.rb@@ -15,7 +15,7 @@ module Jobs# See https://github.com/mperham/sidekiq/blob/3330df0ee37cfd3e0cd3ef01e3e66b584b99d488/lib/sidekiq/job_retry.rb#L216-L234case exception.wrappedwhen Net::SMTPServerBusy- return 1.hour + (rand(30) * (count + 1))+ next 1.hour + (rand(30) * (count + 1))endenddiff --git a/app/jobs/regular/notify_mailing_list_subscribers.rb b/app/jobs/regular/notify_mailing_list_subscribers.rbindex ef81bf9ce28..64c32b7aa19 100644--- a/app/jobs/regular/notify_mailing_list_subscribers.rb+++ b/app/jobs/regular/notify_mailing_list_subscribers.rb@@ -25,7 +25,7 @@ module Jobs# See https://github.com/mperham/sidekiq/blob/3330df0ee37cfd3e0cd3ef01e3e66b584b99d488/lib/sidekiq/job_retry.rb#L216-L234case exception.wrappedwhen SocketError- return RETRY_TIMES[count]+ next RETRY_TIMES[count]endenddiff --git a/app/jobs/regular/user_email.rb b/app/jobs/regular/user_email.rbindex 210ee26236f..3dacea427a9 100644--- a/app/jobs/regular/user_email.rb+++ b/app/jobs/regular/user_email.rb@@ -17,7 +17,7 @@ module Jobs# See https://github.com/mperham/sidekiq/blob/3330df0ee37cfd3e0cd3ef01e3e66b584b99d488/lib/sidekiq/job_retry.rb#L216-L234case exception.wrappedwhen Net::SMTPServerBusy- return 1.hour + (rand(30) * (count + 1))+ next 1.hour + (rand(30) * (count + 1))endenddiff --git a/plugins/automation/app/jobs/regular/discourse_automation/trigger.rb b/plugins/automation/app/jobs/regular/discourse_automation/trigger.rbindex 09adc6c47d1..e6acb5717c4 100644--- a/plugins/automation/app/jobs/regular/discourse_automation/trigger.rb+++ b/plugins/automation/app/jobs/regular/discourse_automation/trigger.rb@@ -14,7 +14,7 @@ module Jobs# See https://github.com/mperham/sidekiq/blob/3330df0ee37cfd3e0cd3ef01e3e66b584b99d488/lib/sidekiq/job_retry.rb#L216-L234case exception.wrappedwhen SocketError- return RETRY_TIMES[count]+ next RETRY_TIMES[count]endend