refactor(shared): simplify deployment status check logic
This commit is contained in:
@@ -1254,10 +1254,9 @@ function isAnyDeploymentInprogress()
|
|||||||
foreach ($runningJobs as $runningJob) {
|
foreach ($runningJobs as $runningJob) {
|
||||||
$horizonJobStatus = getJobStatus($runningJob->horizon_job_id);
|
$horizonJobStatus = getJobStatus($runningJob->horizon_job_id);
|
||||||
if ($horizonJobStatus === 'unknown') {
|
if ($horizonJobStatus === 'unknown') {
|
||||||
return true;
|
|
||||||
}
|
|
||||||
$horizonJobIds[] = $runningJob->horizon_job_id;
|
$horizonJobIds[] = $runningJob->horizon_job_id;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (count($horizonJobIds) === 0) {
|
if (count($horizonJobIds) === 0) {
|
||||||
echo "No deployments in progress.\n";
|
echo "No deployments in progress.\n";
|
||||||
exit(0);
|
exit(0);
|
||||||
|
Reference in New Issue
Block a user