feat: enhance horizon:manage command with worker restart check
- Added a new option `--can-i-restart-this-worker` to the `horizon:manage` command. - Implemented logic to check if the current worker can be restarted based on running jobs in the ApplicationDeploymentQueue. - Refactored the command to include a new method `canIRestartThisWorker` for better code organization. - Removed unnecessary dump statement from the CustomJobRepository.
This commit is contained in:
@@ -31,7 +31,6 @@ class CustomJobRepository extends RedisJobRepository implements CustomJobReposit
|
||||
$this->getRecent()->each(function ($job) use ($jobs, $status, $worker) {
|
||||
if ($job->status === $status) {
|
||||
if ($worker) {
|
||||
dump($job);
|
||||
if ($job->worker !== $worker) {
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user