Skip to content

v0.4.0

Choose a tag to compare

@skybleak333 skybleak333 released this 08 Nov 18:09
· 2 commits to main since this release

Fourth experiment, about Laravel's own queue: debounce with maxWait under steady dispatches.

#[DebounceFor(2, maxWait: 6)], a dispatch every 0.5 s for 60 s, one queue:work --sleep=3. On Laravel 13.37 every job that maxWait forced to run was discarded as superseded, because the next dispatch came before the worker took it. The job didn't run once while dispatches kept coming; the longest wait was about 60 s instead of 6. With the fix from fix/debounce-forced-job applied, it ran every 6–7 s.

It runs on the database queue with SQLite, so it needs no broker: vendor/bin/phpunit tests/DebounceMaxWaitTest.php.

Other changes:

  • bin/lab debounce <seconds> <ms> dispatches the debounced job; LAB_DATABASE points the database queue at an SQLite file.
  • bin/lab connects to RabbitMQ only for the commands that need it.
  • The CI job is called "Experiments" now.

Checked in CI with PHP 8.3–8.5 and Laravel 13.37.