fix(core): set max listeners to avoid warning when running high numbers of parallel tasks (#16993)
This commit is contained in:
parent
b2470de56c
commit
c71027fbfb
@ -1,5 +1,7 @@
|
||||
import { Workspaces } from '../config/workspaces';
|
||||
import { defaultMaxListeners } from 'events';
|
||||
import { performance } from 'perf_hooks';
|
||||
|
||||
import { Workspaces } from '../config/workspaces';
|
||||
import { Hasher } from '../hasher/hasher';
|
||||
import { ForkedProcessTaskRunner } from './forked-process-task-runner';
|
||||
import { workspaceRoot } from '../utils/workspace-root';
|
||||
@ -65,6 +67,9 @@ export class TaskOrchestrator {
|
||||
|
||||
const threads = [];
|
||||
|
||||
process.stdout.setMaxListeners(this.options.parallel + defaultMaxListeners);
|
||||
process.stderr.setMaxListeners(this.options.parallel + defaultMaxListeners);
|
||||
|
||||
// initial seeding of the queue
|
||||
for (let i = 0; i < this.options.parallel; ++i) {
|
||||
threads.push(this.executeNextBatchOfTasksUsingTaskSchedule());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user