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/discourse_automation
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
..
call_zapier_webhook.rb FEATURE: Track automation errors and improve logging (#36938) 2026-01-19 18:50:13 +01:00
send_flag_email.rb FEATURE: New automation for emailing specific users when a post is flagged (#36580) 2025-12-11 10:31:13 +08:00
trigger.rb FIX: use next instead of return in sidekiq_retry_in blocks (#39529) 2026-04-24 16:59:49 +02:00