mtnaghibi / safe-dispatch
Ensuring Reliable Dispatch of Jobs to the Queue
Requires
- php: ^7.4|^8.0
- illuminate/support: ^8.0|^9.0|^10.0
- laravel/horizon: ^5.15
Requires (Dev)
- orchestra/testbench: ^6.0|^7.0|^8.0
- phpunit/phpunit: ^9.0
- squizlabs/php_codesniffer: *
This package is auto-updated.
Last update: 2024-04-23 12:39:10 UTC
README
In Laravel, when attempting to dispatch a job to a queue, there is a possibility of connection failures such as a downed broker, an unresponsive database, or a broken Redis connection. In such cases, it is important to handle the job as a failed job appropriately, and prevent the exception from propagating to the client.
Installation
You can install the package via composer:
composer require mtnaghibi/safe-dispatch
Usage
To use it, simply replace `Dispatchable` with `SafeDispatchable` in your jobs.
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email naghibi.mohammadtaghi@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.