fix: restart queue/AI workers after Laravel release switch

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
gouki
2026-07-26 19:12:33 +00:00
co-authored by Cursor
parent b5979462f0
commit b029201599
+10
View File
@@ -143,6 +143,16 @@ if test "$dry_run" != "true"; then
--workdir "$CONTAINER_DEPLOY_ROOT/current" \
"$PHP_CONTAINER" php artisan up
maintenance_enabled=false
# Ask queue workers to exit after the current job (cache signal).
artisan queue:restart || true
# Restart host daemons so they pick up the new `current` release.
if command -v systemctl >/dev/null 2>&1; then
if command -v sudo >/dev/null 2>&1 && sudo -n true 2>/dev/null; then
sudo -n systemctl try-restart new-pet-queue-worker.service new-pet-ai-worker.service || true
else
systemctl try-restart new-pet-queue-worker.service new-pet-ai-worker.service 2>/dev/null || true
fi
fi
curl --fail --silent --show-error \
--retry 6 --retry-delay 5 --retry-connrefused \
"$HEALTHCHECK_URL" >/dev/null