mirror of
https://github.com/iptv-org/epg
synced 2025-12-17 02:47:02 -05:00
17 lines
430 B
JavaScript
17 lines
430 B
JavaScript
const { logger, db } = require('../core')
|
|
|
|
async function main() {
|
|
await db.queue.load()
|
|
const docs = await db.queue.find({}).sort({ cluster_id: 1 })
|
|
const cluster_id = docs.reduce((acc, curr) => {
|
|
if (!acc.includes(curr.cluster_id)) acc.push(curr.cluster_id)
|
|
return acc
|
|
}, [])
|
|
|
|
const matrix = { cluster_id }
|
|
const output = `::set-output name=matrix::${JSON.stringify(matrix)}`
|
|
logger.info(output)
|
|
}
|
|
|
|
main()
|