Awesome
Automating Laravel Queue Worker Restarts
Supported Versions
Version | Supported |
---|---|
10.x | :white_check_mark: |
11.x | :white_check_mark: |
Managing queue workers in a Laravel application can sometimes be tedious, especially when dealing with long-running processes. A common challenge is ensuring that workers are restarted whenever there are changes in the jobs, events, or listeners folders. Restarting workers manually can be inefficient and prone to oversight specially during development, potentially leading to application inconsistencies or stale queue processing.
To solve this problem, I’ve developed a Laravel package that automates this process. This package detects file changes within your Laravel application’s jobs, events, and listeners folders and automatically restarts the queue worker when changes are detected.
Support us
<!-- [<img src="https://github-ads.s3.eu-central-1.amazonaws.com/queue-watch.jpg?t=1" width="419px" />](https://spatie.be/github-ad-click/queue-watch) We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us). We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards). -->Installation
You can install the package via composer:
composer require rajentrivedi/queue-watch --dev
You can publish the config file with:
php artisan vendor:publish --tag="queue-watch-config"
This is the contents of the published config file:
return [
'directories' => [
app_path('Jobs'),
app_path('Events'),
app_path('Listeners'),
],
Usage
php artisan queue:work:watch
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.