mirror of
https://github.com/iptv-org/iptv.git
synced 2024-09-05 00:01:35 +02:00
15 lines
251 B
JavaScript
15 lines
251 B
JavaScript
|
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()
|