From ef9344d10a2546af07faca2160980268b6f2af4c Mon Sep 17 00:00:00 2001 From: "Joseph.Rawlings" Date: Wed, 3 Dec 2025 21:25:21 -0500 Subject: [PATCH] fix: update queue management in Laravel cache script to ensure proper restart and execution of queue workers --- laravalcache.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/laravalcache.sh b/laravalcache.sh index 461ee6d35..ae5bf1670 100755 --- a/laravalcache.sh +++ b/laravalcache.sh @@ -23,7 +23,7 @@ COMMANDS=( "chown -R www-data:www-data storage bootstrap/cache && chmod -R 775 storage bootstrap/cache" "php artisan package:discover --ansi" "php artisan optimize" - "pkill -f 'artisan queue:work' >/dev/null 2>&1 || true; nohup php artisan queue:work --daemon --quiet >> /dev/null 2>&1 &" + "(php artisan queue:restart --quiet || true; sleep 1; if ! pgrep -f 'artisan queue:work' >/dev/null 2>&1; then nohup php artisan queue:work --daemon --quiet >> /dev/null 2>&1 & fi; true)" "(command -v php >/dev/null 2>&1 && php -r 'if(function_exists(\"opcache_reset\")) opcache_reset();') || true" )