fix: clean script

This commit is contained in:
wancat committed 2023-10-14 15:35:23 +08:00
1 parent 50bf514805
commit e4e53b533f
2 files changed
+5 -4

No files matched your search

+3 -2
View File
@@ -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)
+2 -2
View File
@@ -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()
}