mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 03:20:12 +08:00
fix: clean script
This commit is contained in:
1 parent
50bf514805
commit
e4e53b533f
2 files changed
+5
-4
No files matched your search
@@ -1,7 +1,8 @@
|
|||||||
|
import connectDB from '@linux-odyssey/models'
|
||||||
import { removeExpired } from '../containers/expiryChecker.js'
|
import { removeExpired } from '../containers/expiryChecker.js'
|
||||||
import connectDB from '../db.js'
|
import config from '../config.js'
|
||||||
|
|
||||||
connectDB()
|
connectDB(config.db)
|
||||||
.then(removeExpired)
|
.then(removeExpired)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
process.exit(0)
|
process.exit(0)
|
||||||
|
|||||||
@@ -68,8 +68,8 @@ export async function deleteContainer(id) {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
await container.stop()
|
await container.stop()
|
||||||
await container.remove()
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.log(error)
|
||||||
}
|
}
|
||||||
|
await container.remove()
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user