[12.x] Add reload command and allow services to register#57923
[12.x] Add reload command and allow services to register#57923taylorotwell merged 2 commits intolaravel:12.xfrom
Conversation
a2b64a9 to
be4781e
Compare
|
I like this idea 👀 |
|
@barryvdh do you have time to send a PR to Horizon, Octane, and Reverb for this? 👀 |
|
I can take a look, but do you want me to bump the requirement, or add a version/method check? |
|
Horizon: laravel/horizon#1671 |
|
This is also very useful for development. Horizon for example needs a restart after making queue (jobs) changes and you want to test that locally. |
|
Shouldn't |
I was not aware of the command, but yes I think so. |
I don't think so. Most scheduled tasks spawn separate artisan tasks, which will pick up any changes already. Interrupting a schedule cycle doesn't "release" these tasks on a sort of queue, so some tasks would only run again on their next cycle, be it daily, monthly, or whatever. When a user runs Adding it as an automatic side effect of the |
|
It's for Interrupting Sub-Minute Tasks.
|
* Add reload command * formatting --------- Co-authored-by: Taylor Otwell <taylor@laravel.com>
Add a
php artisan reloadcommand and allow service provider to add their own commands, similar to theoptimizecommand.This will make it easier for services to have 1 command to add in their deployment steps, after the deployment is completed.
It adds the queue command by default, because that command is added by the core. Horizon could perhaps register it on the same 'queue' key to avoid reloading. Services like Pulse, Reverb etc could hook into this similarly.
Alternative for #51993