fix: update queue management in Laravel cache script to ensure proper restart and execution of queue workers

This commit is contained in:
2025-12-03 21:25:21 -05:00
parent 2820329a96
commit ef9344d10a

View File

@@ -23,7 +23,7 @@ COMMANDS=(
"chown -R www-data:www-data storage bootstrap/cache && chmod -R 775 storage bootstrap/cache" "chown -R www-data:www-data storage bootstrap/cache && chmod -R 775 storage bootstrap/cache"
"php artisan package:discover --ansi" "php artisan package:discover --ansi"
"php artisan optimize" "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" "(command -v php >/dev/null 2>&1 && php -r 'if(function_exists(\"opcache_reset\")) opcache_reset();') || true"
) )