refactor(settings): throw error and log the error

This commit is contained in:
Mauricio Siu
2024-07-06 11:55:21 -06:00
parent e0a0f97f70
commit 525a711c55

View File

@@ -94,6 +94,7 @@ export const cleanUpUnusedImages = async () => {
await execAsync("docker image prune --all --force");
} catch (error) {
console.error(error);
throw error;
}
};
@@ -102,6 +103,7 @@ export const cleanStoppedContainers = async () => {
await execAsync("docker container prune --force");
} catch (error) {
console.error(error);
throw error;
}
};
@@ -110,6 +112,7 @@ export const cleanUpUnusedVolumes = async () => {
await execAsync("docker volume prune --force");
} catch (error) {
console.error(error);
throw error;
}
};
@@ -143,6 +146,7 @@ export const startService = async (appName: string) => {
await execAsync(`docker service scale ${appName}=1 `);
} catch (error) {
console.error(error);
throw error;
}
};