Skip to content

Commit 6d11779

Browse files
feat(): add a new config option to determine whether retry or not
1 parent 20b37ac commit 6d11779

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/interfaces/typeorm-options.interface.ts

+8
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ export type TypeOrmModuleOptions = {
1313
* Default: 3000
1414
*/
1515
retryDelay?: number;
16+
/**
17+
* Function that determines whether the module should
18+
* attempt to connect upon failure.
19+
*
20+
* @param err error that was thrown
21+
* @returns whether to retry connection or not
22+
*/
23+
toRetry?: (err: any) => boolean;
1624
/**
1725
* If `true`, entities will be loaded automatically.
1826
*/

0 commit comments

Comments
 (0)