rename to TaskScheduler to reduce collision risk with other concepts

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2021-10-28 15:25:37 +02:00
parent 92d85b80e9
commit 85cc6bd6aa
11 changed files with 37 additions and 33 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
# @backstage/backend-tasks
Common distributed task management / locking library for Backstage backends.
Common distributed task management for Backstage backends.
## Usage
@@ -15,12 +15,12 @@ yarn add @backstage/backend-tasks
then make use of its facilities as necessary:
```typescript
import { TaskManager } from '@backstage/backend-tasks';
import { TaskScheduler } from '@backstage/backend-tasks';
import { Duration } from 'luxon';
const manager = TaskManager.fromConfig(rootConfig).forPlugin('my-plugin');
const scheduler = TaskScheduler.fromConfig(rootConfig).forPlugin('my-plugin');
await manager.scheduleTask({
await scheduler.scheduleTask({
id: 'refresh-things',
frequency: Duration.fromObject({ minutes: 10 }),
fn: async () => {