Merge pull request #13817 from howlowck/howlowck/non-blocking

Scaffolder: `concurrentTasksLimit` for TaskWorker
This commit is contained in:
Johan Haals
2022-12-06 11:34:57 +01:00
committed by GitHub
8 changed files with 206 additions and 4 deletions
+21
View File
@@ -0,0 +1,21 @@
---
'@backstage/plugin-scaffolder-backend': minor
---
Deprecated the `taskWorkers` option in RouterOptions in favor of `concurrentTasksLimit` which sets the limit of concurrent tasks in a single TaskWorker
TaskWorker can now run multiple (defaults to 10) tasks concurrently using the `concurrentTasksLimit` option available in both `RouterOptions` and `CreateWorkerOptions`.
To use the option to create a TaskWorker:
```diff
const worker = await TaskWorker.create({
taskBroker,
actionRegistry,
integrations,
logger,
workingDirectory,
additionalTemplateFilters,
+ concurrentTasksLimit: 10 // (1 to Infinity)
});
```