Skip to content

2.2.0 — Single-instance flock guard

Latest

Choose a tag to compare

@Vitexus Vitexus released this 02 Jun 07:52
· 9 commits to main since this release

What's new

Single-instance protection

The scheduler daemon now acquires an exclusive flock lock on a pidfile ($TMPDIR/multiflexi-scheduler.pid) at startup. A second concurrent instance exits immediately, preventing the same RunTemplate from being queued twice when a restart or misconfigured cron overlaps an already-running daemon.

This closes the root cause of duplicate scheduled jobs (e.g. runtemplate 201 being enqueued twice at 2026-06-02 05:03:00).

Changes

  • daemon.php — flock-based single-instance guard before waitForDatabase()
  • DaemonGuardTest — 3 new tests: daemon source check, double-acquisition prevention, lock release on close
  • README updated with single-instance protection section