Releases: dereuromark/cakephp-queue
3.15.1
Bugfixes
- Fix local development and kill commands (Ctrl+C etc) to properly abort the queue worker process. Depending on your deployment process this could also be useful here to clean up the process list.
Improvements
- Add link to worker process if available. This link will be gone one the worker terminated.
- Server info will now be logged into error log data by default, as well
3.15.0
Improvements
Max workers per server
Added maxworkers
config to set the max amount of workers per server. If not set or 0 it will behave as before, but with this > 0 it will assert that a cronjob cannot start more workers than currently running. It includes workers that died improperly to ensure this cannot bypass bottleneck situations where workers got marked as "to be stopped" but are still running some background script for minutes more.
Based on your memory and the jobs you are running you can estimate how many workers in parallel are the maximum you want to allow. This helps to prevent "Fatal error: Out of Memory" situations or other long-running jobs in parallel overloading your server (load >> 1).
Import/Export
It is now easier to export failed jobs and import them locally to re-run there for debugging.
You can import them as-is, or auto-resetted.
3.14.1
Bugfixes
- Fix pid to not be int casted.
- Validation requirePresence('workerkey') added for processes
3.14.0
Improvements
- Removed deprecations, CakePHP 3.7+ now.
- Easier job adding from CLI by default.
- Added invisible way (/data/ instead of /edit/ in backend) to modify data payload for trivial cases.
- Processes (running workers) can also now be terminated from the web backend.
Multi CLI Server Support
You can now run multiple worker servers:
- Tracking server name per worker now - make sure you have either
env('SERVER_NAME')
orgethostname()
return a unique name per server instance. - Added better deploy window handling using
bin/cake queue end
in the deployment script by shutting down active workers early. Either all (bin/cake queue end -q
), or by server instance (bin/cake queue end server -q
).
To migrate make sure you execute this once all workers have been terminated (no active processes):
bin/cake migrations migrate -p Queue
3.13.1
Bugfixes
- Limit the error output on the overview page.
- Config Queue.exitwhennothingtodo is not required anymore
3.13.0
Improvements
- getOrFail() usage where required/needed.
- FrozenTime() usage for better timezone handling
- Prevent config loading from file if Configure key
Queue.configLoaded
is found. - Include processes status in
queue settings
command to display currently running jobs. - Colorful (green) success messages in CLI
- Nullable improvements around DateTime
3.12.0
Improvements
- Consistent FrozenTime usage for datetime handling to prevent timezone issues (DB vs PHP) for delayed jobs.
- Improved updateProgress() to allow status update.
- Improve pending widget overview (include delay, progress and status)
- Allow delayed job execution to be tested from the admin backend.
- Include detailed stats per job type. Needs to be enabled via
isStatisticEnabled
config.
3.11.0
Improvements
- Better isQueued() handling with optional job type
- CakePHP 3.6+, deprecations removed
- Phinx 0.10 compatibility
3.10.4
Bugfixes
- Fixed exclude lists for types or groups.
- Use date() around timestamp usage.
3.10.3
Bugfixes
Make sure that if a process gets stuck, e.g. in some exec() forever running code, that the crontab doesnt built up too many never-ending workers running and then killing the server.
Default: 120s*100 = 3.3h
So if you spawn new runners every 5 minutes via crontab cronjob setting, you get a total process count of 40 as the worse case scenario.
Via workertimeout config it can be manually adjusted to a custom value.
Make sure you adjust it to the longest possible running job * x seconds at least.
The previous 0 (forever) timeout on runners is not a recommended setting anymore.