diff --git a/server/src/cli/clean.js b/server/src/cli/clean.js index ab26620..b73029f 100644 --- a/server/src/cli/clean.js +++ b/server/src/cli/clean.js @@ -1,7 +1,8 @@ +import connectDB from '@linux-odyssey/models' import { removeExpired } from '../containers/expiryChecker.js' -import connectDB from '../db.js' +import config from '../config.js' -connectDB() +connectDB(config.db) .then(removeExpired) .then(() => { process.exit(0) diff --git a/server/src/containers/docker.js b/server/src/containers/docker.js index a4c768f..bc3a39a 100644 --- a/server/src/containers/docker.js +++ b/server/src/containers/docker.js @@ -68,8 +68,8 @@ export async function deleteContainer(id) { } try { await container.stop() - await container.remove() } catch (error) { - console.error(error) + console.log(error) } + await container.remove() }