0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-14 13:58:53 +08:00
discourse/plugins/automation/app/jobs/regular
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
..
discourse_automation FIX: use next instead of return in sidekiq_retry_in blocks (#39529) 2026-04-24 16:59:49 +02:00