mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-03 21:15:23 +02:00
fix(deployment): correct deployment cancellation logic and ensure proper status update
- Updated the initCancelDeployments function to set the status of running deployments to 'cancelled' instead of 'error'. - Reintroduced the call to initCancelDeployments in the server initialization process to ensure cancellations are handled correctly.
This commit is contained in:
@@ -7,8 +7,8 @@ export const initCancelDeployments = async () => {
|
||||
console.log("Setting up cancel deployments....");
|
||||
|
||||
const result = await db.update(deployments).set({
|
||||
status: "error",
|
||||
}).where(eq(deployments.status, "cancelled"));
|
||||
status: "cancelled",
|
||||
}).where(eq(deployments.status, "running")).returning();
|
||||
|
||||
console.log(`Cancelled ${result.length} deployments`);
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user