mirror of
https://github.com/discourse/discourse.git
synced 2024-12-24 00:13:44 +08:00
8ed684312f
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. |
||
---|---|---|
.. | ||
fabricators | ||
integration | ||
jobs | ||
lib | ||
models | ||
queries | ||
requests | ||
scripts | ||
serializers | ||
services | ||
system | ||
triggers | ||
discourse_automation_helper.rb |