Update README

Signed-off-by: Philipp Hugenroth <philipph@spotify.com>
This commit is contained in:
Philipp Hugenroth
2023-08-14 17:31:46 +02:00
parent 53c52953e4
commit c823d2b02d
+22 -14
View File
@@ -70,24 +70,32 @@ In your `packages/backend/src/index.ts` make the following changes:
// ... other feature additions
+ const linguistSchedule: TaskScheduleDefinition = {
+ frequency: { minutes: 2 },
+ timeout: { minutes: 15 },
+ initialDelay: { seconds: 15 },
+ };
+ backend.add(
+ linguistPlugin({
+ schedule: linguistSchedule,
+ age: { days: 30 },
+ batchSize: 2,
+ useSourceLocation: false,
+ }),
+ );
+ backend.add(linguistPlugin());
backend.start();
```
The plugin options can be set through the `app-config.yaml`:
```yaml
// ...
linguist:
schedule:
frequency:
minutes: 2
timeout:
minutes: 2
initialDelay:
seconds: 15
age:
days: 30
batchSize: 2
useSourceLocation: false
// ...
```
## Plugin Option
The Linguist backend has various plugin options that you can provide to the `createRouter` function in your `packages/backend/src/plugins/linguist.ts` file that will allow you to configure various aspects of how it works. The following sections go into the details of these options