mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-12 10:00:05 -04:00
Update .gitignore
This commit is contained in:
parent
90c8aca0e6
commit
b39dc83f8b
5 changed files with 301 additions and 2 deletions
16
scripts/commands/database/matrix.js
Normal file
16
scripts/commands/database/matrix.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
const { logger, db } = require('../../core')
|
||||
|
||||
async function main() {
|
||||
await db.streams.load()
|
||||
const docs = await db.streams.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()
|
Loading…
Add table
Add a link
Reference in a new issue