You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit dcdea6b
Browse filesBrowse the repository at this point in the historyBrowse files
fix: correct job state, delays and the redis adapter, and add a test suite
Job::$data was static, so every job in a worker process shared one payload and
two dispatches with different with() data read each other's. Delays called
sleep() inside the worker loop, blocking every other queued job for the length
of the delay; they are now an available_at value the adapters schedule against.
The redis adapter kept the whole queue in a single key as a json blob and did a
read-modify-write on every operation, which is O(n) and loses updates as soon as
a second worker runs. It now uses a list for pending, a sorted set for delayed
and a hash per job, and handles the phpredis/predis lrem argument order split.
Also: jobs stuck in 'processing' after a worker crash are swept back to pending
rather than stranded forever, failures record their exception instead of
discarding it, retries take a delay, and pcntl calls are guarded so the worker
no longer fatals on hosts without the extension.
Adds a Pest suite of 14 tests over the adapters, the worker loop, retry and
expiry behaviour, stuck-job recovery and the queue:work command's error paths,
plus phpunit.xml, alchemy.yml and composer scripts for test/lint/analyse/ci.
0 commit comments