Skip to content

Commit

Permalink
refactor(settings): add console logs for errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Siumauricio committed Jul 6, 2024
1 parent 45aae52 commit e0a0f97
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions server/utils/docker/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ export const containerExists = async (containerName: string) => {
export const stopService = async (appName: string) => {
try {
await execAsync(`docker service scale ${appName}=0 `);
console.log("Service stopped ✅");
} catch (error) {
console.error(error);
return error;
}
};
Expand Down Expand Up @@ -93,23 +93,23 @@ export const cleanUpUnusedImages = async () => {
try {
await execAsync("docker image prune --all --force");
} catch (error) {
throw error;
console.error(error);
}
};

export const cleanStoppedContainers = async () => {
try {
await execAsync("docker container prune --force");
} catch (error) {
throw error;
console.error(error);
}
};

export const cleanUpUnusedVolumes = async () => {
try {
await execAsync("docker volume prune --force");
} catch (error) {
throw error;
console.error(error);
}
};

Expand Down Expand Up @@ -142,7 +142,7 @@ export const startService = async (appName: string) => {
try {
await execAsync(`docker service scale ${appName}=1 `);
} catch (error) {
throw error;
console.error(error);
}
};

Expand Down

0 comments on commit e0a0f97

Please sign in to comment.