Skip to content

Conversation

@saeedvaziry
Copy link
Member

closes #913

@saeedvaziry saeedvaziry requested a review from Copilot November 5, 2025 19:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the worker restart mechanism during deployment to restart only workers belonging to the specific site being deployed, rather than restarting all workers on the server. This improves deployment isolation and prevents unintended service interruptions for other sites on the same server.

  • Replaces restartAll() with restartByIds() to target specific workers
  • Adds new restartByIds() method to the ProcessManager interface and Supervisor implementation
  • Introduces comprehensive test coverage for both classic and modern deployment scenarios

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
app/Jobs/Site/DeployJob.php Updated to collect site-specific worker IDs and use restartByIds() instead of restartAll()
app/Services/ProcessManager/ProcessManager.php Added restartByIds() method signature to the interface
app/Services/ProcessManager/Supervisor.php Implemented restartByIds() method with worker ID filtering
resources/views/ssh/services/process-manager/supervisor/restart-workers.blade.php New Blade template for executing targeted worker restarts via supervisorctl
tests/Feature/ApplicationTest.php Added tests to verify only site-specific workers are restarted during deployments

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@saeedvaziry saeedvaziry merged commit 2b3c1eb into 3.x Nov 6, 2025
3 checks passed
@saeedvaziry saeedvaziry deleted the site-workers branch November 6, 2025 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: "Restart workers after deployment" restarts all workers regardless of site association

2 participants