Replies: 1 comment 1 reply
-
Suggestion: Add these to a custom composer script... "scripts": {
"reload-services": [
"@php artisan reverb:restart --quiet || true",
"@php artisan octane:reload --quiet || true",
"@php artisan queue:restart --quiet || true",
"@php artisan horizon:terminate --quiet || true",
"@php artisan pulse:restart --quiet || true",
]
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Issue
Currently, each 'service' has its own restart command:
Deploy scrips (either with Laravel Forge, something like Capistrano/Deployer can be somewhat easily updated, but easy to forget. Manual deployments (eg.
git pull
) make it even more easy to forget one of those, leading to weird behavior.Proposal
I propose a
php artisan reload
(ordeploy
/restart
) to reload all those services at once. Each service should be responsible for registering itself to this reload command. This can be either:ReloadManager::addCommand('php artisan reverb:restart')
Event::dispatch(new ReloadingLaravel)
; which packages can hook into.Something similar is done with
php artisan optimize
although this one is not configurable. This makes it easy for deploy scripts to just addphp artisan reload
and not worry about specific services.Beta Was this translation helpful? Give feedback.
All reactions