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
Gabriel Grubba 6e69e6029d
FIX: Destroy pending PM after an unexpected send error (#40461)
Previously, when `Scriptable::Utils.send_pm` raised an unexpected error,
`Jobs::DiscourseAutomation::Tracker#send_pending_pm` only logged it and
left the `PendingPm` row intact, so the scheduled job re-processed the
same failing PM every minute indefinitely.

This change destroys the pending PM in the generic `rescue` block —
mirroring the existing `ActiveRecord::RecordNotSaved` handling — so a
permanently-failing PM is removed after one attempt instead of looping
forever.

Resolves https://patch.discourse.org/patch-triage/14

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 10:02:51 -03:00
..
controllers/discourse_automation DEV: Fix a sidekiq deprecation in d-automation (#39590) 2026-04-28 18:48:03 +02:00
jobs FIX: Destroy pending PM after an unexpected send error (#40461) 2026-06-02 10:02:51 -03:00
mailers/discourse_automation FEATURE: New automation for emailing specific users when a post is flagged (#36580) 2025-12-11 10:31:13 +08:00
models/discourse_automation DEV: Enable Style/RedundantSelf rubocop rule (#40098) 2026-05-19 19:27:45 +02:00
serializers/discourse_automation DEV: Enable Style/RedundantParentheses rubocop rule (#40095) 2026-05-19 15:48:09 +02:00
services/discourse_automation DEV: Refactor automation Update service per PR #36458 feedback (#36771) 2025-12-18 18:16:03 +01:00