bbc1afb5e1f1d55f16568e6317683851c18127ff
The mkdir-based worker lock had no staleness detection at all, unlike BackupQueueService::withQueueLock()'s 120s override for its own queue lock. If the root cron-driven worker was ever killed ungracefully (OOM, kill -9, reboot mid-job), the lock directory was left behind forever - every subsequent cron tick would silently exit without processing any job, so backups/restores would queue forever with no visible error. Track the owning PID inside the lock directory and reclaim the lock when that PID is no longer running, or when the lock has no PID file and is older than WORKER_LOCK_STALE_SECONDS (default 300s). Log to stderr on both the "held by a live worker" and "reclaiming stale lock" paths instead of exiting silently either way. cleanup() now uses rm -rf since the lock directory holds a pid file, not just an empty marker.
Description
No description provided
Languages
PHP
56.5%
Shell
39.2%
CSS
4.3%