Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

Refactor application deployment logic

Andras Bacsai409ba8a1bb24
diff --git a/bootstrap/helpers/applications.php b/bootstrap/helpers/applications.php
index 120c92ddd8..f921c2df84 100644
--- a/bootstrap/helpers/applications.php
+++ b/bootstrap/helpers/applications.php
@@ -40,21 +40,21 @@ function queue_application_deployment(Application $application, string $deployme
'git_type' => $git_type
]);
- // if ($no_questions_asked) {
- // $deployment->update([
- // 'status' => ApplicationDeploymentStatus::IN_PROGRESS->value,
- // ]);
- // dispatch(new ApplicationDeploymentJob(
- // application_deployment_queue_id: $deployment->id,
- // ));
- // } else if (next_queuable($server_id, $application_id)) {
- // $deployment->update([
- // 'status' => ApplicationDeploymentStatus::IN_PROGRESS->value,
- // ]);
- // dispatch(new ApplicationDeploymentJob(
- // application_deployment_queue_id: $deployment->id,
- // ));
- // }
+ if ($no_questions_asked) {
+ $deployment->update([
+ 'status' => ApplicationDeploymentStatus::IN_PROGRESS->value,
+ ]);
+ dispatch(new ApplicationDeploymentJob(
+ application_deployment_queue_id: $deployment->id,
+ ));
+ } else if (next_queuable($server_id, $application_id)) {
+ $deployment->update([
+ 'status' => ApplicationDeploymentStatus::IN_PROGRESS->value,
+ ]);
+ dispatch(new ApplicationDeploymentJob(
+ application_deployment_queue_id: $deployment->id,
+ ));
+ }
}
function force_start_deployment(ApplicationDeploymentQueue $deployment)
{