@@ -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
|
||||
|
||||
Reference in New Issue
Block a user