Create scripts/commands

This commit is contained in:
Aleksandr Statciuk committed 2021-12-12 07:10:03 +03:00
1 parent ab869f8f28
commit 19563afe68
9 files changed
+939

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
const { db, logger } = require('../core')
async function main() {
const removed = await db.remove(
{ 'status.code': { $in: ['timeout', 'offline'] } },
{ multi: true }
)
db.compact()
logger.info(`Removed ${removed} links`)
}
main()