Fix cleanup of halted deployments

This commit is contained in:
Andras Bacsai 2024-02-08 12:37:56 +01:00
parent 48b4c17391
commit 037ba3ff79

View File

@ -124,6 +124,7 @@ private function cleanup_in_progress_application_deployments()
try {
$halted_deployments = ApplicationDeploymentQueue::where('status', '==', ApplicationDeploymentStatus::IN_PROGRESS)->where('status', '==', ApplicationDeploymentStatus::QUEUED)->get();
foreach ($halted_deployments as $deployment) {
echo "Cleaning up deployment: {$deployment->id}\n";
$deployment->status = ApplicationDeploymentStatus::FAILED->value;
$deployment->save();
}