[autofix.ci] apply automated fixes

This commit is contained in:
autofix-ci[bot]
2025-12-08 02:30:23 +00:00
committed by Marc Fernandez
parent 33fb21bfe1
commit 95dd9ddeb6
4 changed files with 80 additions and 73 deletions

View File

@@ -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);
}