From ba5283039c669a3180df47cfeb9ffd34a85b1e02 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Sun, 14 Dec 2025 05:11:51 +0000 Subject: [PATCH] [autofix.ci] apply automated fixes --- packages/server/src/utils/docker/utils.ts | 46 ++++++++++++----------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/packages/server/src/utils/docker/utils.ts b/packages/server/src/utils/docker/utils.ts index a58ad441c..565e15033 100644 --- a/packages/server/src/utils/docker/utils.ts +++ b/packages/server/src/utils/docker/utils.ts @@ -262,35 +262,37 @@ export const cleanupSystem = async (serverId?: string) => { * * https://github.com/Dokploy/dokploy/pull/3266 */ -const excludedCleanupAllCommands: (keyof typeof cleanupCommands)[] = ['volumes']; +const excludedCleanupAllCommands: (keyof typeof cleanupCommands)[] = [ + "volumes", +]; export const cleanupAll = async (serverId?: string) => { - for (const [key, command] of Object.entries(cleanupCommands)) { - if (excludedCleanupAllCommands.includes(key)) continue; + for (const [key, command] of Object.entries(cleanupCommands)) { + if (excludedCleanupAllCommands.includes(key)) continue; - try { - if (serverId) { - await execAsyncRemote(serverId, dockerSafeExec(command)); - } else { - await execAsync(dockerSafeExec(command)); - } - } catch {} - } + try { + if (serverId) { + await execAsyncRemote(serverId, dockerSafeExec(command)); + } else { + await execAsync(dockerSafeExec(command)); + } + } catch {} + } }; export const cleanupAllBackground = async (serverId?: string) => { Promise.allSettled( - Object.entries(cleanupCommands) - .filter(([key]) => !excludedCleanupAllCommands.includes(key)) - .map(async ([, command]) => { - try { - if (serverId) { - await execAsyncRemote(serverId, dockerSafeExec(command)); - } else { - await execAsync(dockerSafeExec(command)); - } - } catch {} - }) + Object.entries(cleanupCommands) + .filter(([key]) => !excludedCleanupAllCommands.includes(key)) + .map(async ([, command]) => { + try { + if (serverId) { + await execAsyncRemote(serverId, dockerSafeExec(command)); + } else { + await execAsync(dockerSafeExec(command)); + } + } catch {} + }), ) .then((results) => { const failed = results.filter((r) => r.status === "rejected");