mirror of
https://github.com/iptv-org/iptv
synced 2025-12-16 18:37:17 -05:00
Use the number of CPU cores as the default for --parallel
This commit is contained in:
@@ -5,6 +5,7 @@ import { Stream } from '../../models'
|
|||||||
import { program } from 'commander'
|
import { program } from 'commander'
|
||||||
import { eachLimit } from 'async-es'
|
import { eachLimit } from 'async-es'
|
||||||
import chalk from 'chalk'
|
import chalk from 'chalk'
|
||||||
|
import os from 'node:os'
|
||||||
import type { DataLoaderData } from '../../types/dataLoader'
|
import type { DataLoaderData } from '../../types/dataLoader'
|
||||||
import type { DataProcessorData } from '../../types/dataProcessor'
|
import type { DataProcessorData } from '../../types/dataProcessor'
|
||||||
|
|
||||||
@@ -24,7 +25,7 @@ program
|
|||||||
'-p, --parallel <number>',
|
'-p, --parallel <number>',
|
||||||
'Batch size of streams to test concurrently',
|
'Batch size of streams to test concurrently',
|
||||||
(value: string) => parseInt(value),
|
(value: string) => parseInt(value),
|
||||||
10
|
os.cpus().length
|
||||||
)
|
)
|
||||||
.option('-x, --proxy <url>', 'Use the specified proxy')
|
.option('-x, --proxy <url>', 'Use the specified proxy')
|
||||||
.parse(process.argv)
|
.parse(process.argv)
|
||||||
|
|||||||
Reference in New Issue
Block a user