discourse/plugins/automation
Osama Sayegh 8ed684312f
FIX: Prevent race condition in recurring automations (#26828)
Recurring automations are triggered by a scheduled job that runs every minute and checks for due automations, runs them and then marks as them as completed (by deleting the `PendingAutomation` record). However, the job is currently subject to a race condition where a recurring automation can be executed more than once at its due date if it takes more than a minute to finish.

This commit adds a mutex around the code that triggers the recurring automation so that no concurrent executions can happen for a single automation.

Meta topic: https://meta.discourse.org/t/daily-summary-9pm-utc/291850/119?u=osama.
2024-05-01 09:01:58 +03:00
..
admin/assets/javascripts/admin DEV: Convert various components to gjs (#26782) 2024-04-30 16:44:49 +02:00
app FIX: Prevent race condition in recurring automations (#26828) 2024-05-01 09:01:58 +03:00
assets/stylesheets/common DEV: allows fabricators to use faker (#26555) 2024-04-08 21:00:09 +02:00
config Update translations (#26821) 2024-04-30 21:57:28 +02:00
db/migrate FEATURE: Merge discourse-automation (#26432) 2024-04-03 18:20:43 +03:00
lib FIX: ensures we don't exit without pending automations (#26771) 2024-04-26 14:05:27 +02:00
spec FIX: Prevent race condition in recurring automations (#26828) 2024-05-01 09:01:58 +03:00
test/javascripts/integration/components DEV: allows fabricators to use faker (#26555) 2024-04-08 21:00:09 +02:00
plugin.rb FIX: Prevent infinite loop of automations triggering each other (#26814) 2024-04-30 20:13:29 +03:00