change to using a scope parameter instead

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-04-22 20:06:31 +02:00
parent cfd779a9bc
commit d63133e521
9 changed files with 211 additions and 115 deletions
+5 -1
View File
@@ -2,4 +2,8 @@
'@backstage/backend-tasks': patch
---
The task scheduler now has two new methods: `scheduleLocalTask` and `createScheduledLocalTaskRunner`, which can be used to perform local-only recurring tasks. This can be used to replace usages of `runPeriodically` helpers.
Scheduled tasks now have an optional `scope` field. If unset, or having the
value `'global'`, the old behavior with cross-worker locking is retained. If
having the value `'local'`, there is no coordination across workers and the
behavior is more like `setInterval`. This can be used to replace usages of
`runPeriodically` helpers.