0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-14 13:58:53 +08:00
discourse/plugins/automation/spec
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
..
fabricators FIX: ensures global notices are destroyed on post created (#28684) 2024-09-02 21:17:10 +02:00
integration DEV: add shortcut fab!(:variable, :fabricator) to specs (#33577) 2025-07-11 11:16:34 -03:00
jobs FIX: Destroy pending PM after an unexpected send error (#40461) 2026-06-02 10:02:51 -03:00
lib DEV: Add automatically closed topics event trigger and adapt the automation plugin's auto tag_topic_script accordingly (#39235) 2026-04-14 14:50:36 -05:00
models DEV: Fix job serialization deprecation in d-automation (#39286) 2026-04-15 15:39:16 +02:00
requests FEATURE: Track automation errors and improve logging (#36938) 2026-01-19 18:50:13 +01:00
scripts FIX: Prevent automation set_topic_timer from reopening closed topics (#39375) 2026-04-21 15:08:31 +02:00
serializers DEV: Clean up state to prevent flaky tests (#27397) 2024-06-10 08:41:03 +08:00
services DEV: Refactor automation Update service per PR #36458 feedback (#36771) 2025-12-18 18:16:03 +01:00
system DEV: Enable Rails/FilePath rubocop rule (#40097) 2026-05-19 19:07:54 +02:00
triggers DEV: fix a large amount of typos (#37428) 2026-02-02 16:31:58 +11:00
plugin_helper.rb DEV: Convert some files to autoloading and various improvements (#26860) 2024-05-06 23:12:55 +03:00