Fixes
- A deadlock or lock wait timeout while saving a job's completion no longer kills the worker and leaves the executed job unconfirmed.
markJobDone()retries the save up to three times, and if it still fails the worker logs that the job may run again, skipsQueue.Job.completedand keeps running. #523 #524
Improvements
- Job reservation uses
FOR UPDATE SKIP LOCKEDon MySQL 8.0.1+, MariaDB 10.6+ and PostgreSQL 9.5+, which reduces lock contention between workers. Controlled by the newQueue.skipLockedkey (nulldetects,trueforces,falsekeeps plainFOR UPDATE). #524
Upgrade notes
- On supported servers
SKIP LOCKEDis on by default. Under contention a worker may take the next eligible job instead of waiting for a row another worker is reserving, so strict priority order can loosen briefly. SetQueue.skipLockedtofalseto keep the previous locking. #524 - A job whose completion cannot be saved may run again after its timeout. Keep tasks idempotent. #524
Full Changelog: 8.17.0...8.18.0