gajus / turbowatch

Extremely fast file change detector and task orchestrator for Node.js.
Other
944 stars 23 forks source link

Limit concurrency of non-persistent tasks #30

Open gajus opened 1 year ago

gajus commented 1 year ago

There should be a way to ensure that we don't run all triggers at once.

This is particularly relevant for when Turbowatch starts.

At the moment, if we load all scripts, such as turbowatch **/turbowatch.ts this will immediately fire all triggers that are required to run at start. That produces high congestion of CPU/logs. We should provide a reasonable (configurable) default, such as 10.