mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-05 22:15:22 +02:00
[autofix.ci] apply automated fixes
This commit is contained in:
committed by
Marc Fernandez
parent
33fb21bfe1
commit
95dd9ddeb6
@@ -849,7 +849,7 @@ export const clearOldDeploymentsByApplicationId = async (
|
||||
// If there's an active deployment, keep it and remove all others
|
||||
// If there's no active deployment, keep the most recent one and remove the rest
|
||||
let deploymentsToKeep: string[] = [];
|
||||
|
||||
|
||||
if (activeDeployment) {
|
||||
deploymentsToKeep.push(activeDeployment.deploymentId);
|
||||
} else if (deploymentsList.length > 0) {
|
||||
@@ -866,7 +866,7 @@ export const clearOldDeploymentsByApplicationId = async (
|
||||
if (deployment.rollbackId) {
|
||||
await removeRollbackById(deployment.rollbackId);
|
||||
}
|
||||
|
||||
|
||||
// Remove log file if it exists
|
||||
const logPath = deployment.logPath;
|
||||
if (logPath && logPath !== "." && existsSync(logPath)) {
|
||||
@@ -876,7 +876,7 @@ export const clearOldDeploymentsByApplicationId = async (
|
||||
console.error(`Error removing log file ${logPath}:`, error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Delete deployment from database
|
||||
await removeDeployment(deployment.deploymentId);
|
||||
}
|
||||
@@ -902,7 +902,7 @@ export const clearOldDeploymentsByComposeId = async (composeId: string) => {
|
||||
// If there's an active deployment, keep it and remove all others
|
||||
// If there's no active deployment, keep the most recent one and remove the rest
|
||||
let deploymentsToKeep: string[] = [];
|
||||
|
||||
|
||||
if (activeDeployment) {
|
||||
deploymentsToKeep.push(activeDeployment.deploymentId);
|
||||
} else if (deploymentsList.length > 0) {
|
||||
@@ -919,7 +919,7 @@ export const clearOldDeploymentsByComposeId = async (composeId: string) => {
|
||||
if (deployment.rollbackId) {
|
||||
await removeRollbackById(deployment.rollbackId);
|
||||
}
|
||||
|
||||
|
||||
// Remove log file if it exists
|
||||
const logPath = deployment.logPath;
|
||||
if (logPath && logPath !== "." && existsSync(logPath)) {
|
||||
@@ -929,7 +929,7 @@ export const clearOldDeploymentsByComposeId = async (composeId: string) => {
|
||||
console.error(`Error removing log file ${logPath}:`, error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Delete deployment from database
|
||||
await removeDeployment(deployment.deploymentId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user