queue
queue copied to clipboard
feat: events
Description
This PR introduces an event system that enables users to observe and respond to various queue operations. The $keepDoneJobs option (previously optional and disabled by default) has been removed, as its functionality can now be managed through events.
Since RabbitMQ didn't support the $keepDoneJobs option, this update ensures consistent behavior across all handlers.
Checklist:
- [x] Securely signed commits
- [x] Component(s) with PHPDoc blocks, only if necessary or adds value
- [x] Unit testing, with >80% coverage
- [x] User guide updated
- [x] Conforms to style guide
Pull Request Test Coverage Report for Build 19612203978
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
Details
- 275 of 362 (75.97%) changed or added relevant lines in 7 files are covered.
- 14 unchanged lines in 5 files lost coverage.
- Overall coverage increased (+11.7%) to 85.929%
| Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
|---|---|---|---|
| src/Handlers/RabbitMQHandler.php | 18 | 24 | 75.0% |
| src/Commands/QueueWork.php | 65 | 79 | 82.28% |
| src/Handlers/PredisHandler.php | 21 | 40 | 52.5% |
| src/Handlers/DatabaseHandler.php | 19 | 40 | 47.5% |
| src/Handlers/RedisHandler.php | 21 | 48 | 43.75% |
| <!-- | Total: | 275 | 362 |
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| src/Handlers/DatabaseHandler.php | 1 | 67.61% |
| src/Handlers/PredisHandler.php | 2 | 74.74% |
| src/Handlers/RabbitMQHandler.php | 2 | 83.33% |
| src/Handlers/RedisHandler.php | 2 | 67.54% |
| src/Commands/QueueWork.php | 7 | 79.3% |
| <!-- | Total: | 14 |
| Totals | |
|---|---|
| Change from base Build 17724836360: | 11.7% |
| Covered Lines: | 1087 |
| Relevant Lines: | 1265 |