We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d5b3180 commit f26049fCopy full SHA for f26049f
docs/v3/trigger-config.mdx
@@ -222,15 +222,15 @@ export const AppDataSource = new DataSource({
222
});
223
```
224
225
-And then in your trigger.config.ts file you can initialize the datasource using the new `init` option:
+And then in your trigger.config.ts file you can initialize the datasource using the `onStart` lifecycle function option:
226
227
```ts trigger.config.ts
228
import type { TriggerConfig } from "@trigger.dev/sdk/v3";
229
import { AppDataSource } from "@/trigger/orm";
230
231
export const config: TriggerConfig = {
232
// ... other options here
233
- init: async (payload, { ctx }) => {
+ onStart: async (payload, { ctx }) => {
234
await AppDataSource.initialize();
235
},
236
};
0 commit comments