discourse/app/jobs
Joffrey JAFFEUX e2db27a7ba
FIX: use next instead of return in sidekiq_retry_in blocks (#39529)
Using `return` inside a block attempts to return from the enclosing
method rather than from the block itself. In Sidekiq's `job_retry`
context this raises `LocalJumpError: unexpected return`, which shows up
in logs as:

```
Job exception: unexpected return
```

The correct Ruby idiom for exiting a block with a value is `next
<value>`.

Four jobs had the same pattern:
- `app/jobs/regular/user_email.rb`
- `app/jobs/regular/group_smtp_email.rb`
- `app/jobs/regular/notify_mailing_list_subscribers.rb`
- `plugins/automation/app/jobs/regular/discourse_automation/trigger.rb`
2026-04-24 16:59:49 +02:00
..
concerns DEV: Update rubocop-discourse to 3.13 and autofix issues (#35073) 2025-10-06 16:11:01 +02:00
onceoff DEV: Hand-pick Rails/WhereNot autofixes (#35117) 2025-10-03 13:29:22 +02:00
regular FIX: use next instead of return in sidekiq_retry_in blocks (#39529) 2026-04-24 16:59:49 +02:00
scheduled FEATURE: Add problem checks page to admin panel and allow ignoring problem checks (#39103) 2026-04-23 08:28:33 +08:00
base.rb DEV: Update rubocop-discourse to 3.13 and autofix issues (#35073) 2025-10-06 16:11:01 +02:00