Skip to content

Commit

Permalink
feat(): add a new config option to determine whether retry or not
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Sep 1, 2020
1 parent 20b37ac commit 6d11779
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/interfaces/typeorm-options.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ export type TypeOrmModuleOptions = {
* Default: 3000
*/
retryDelay?: number;
/**
* Function that determines whether the module should
* attempt to connect upon failure.
*
* @param err error that was thrown
* @returns whether to retry connection or not
*/
toRetry?: (err: any) => boolean;
/**
* If `true`, entities will be loaded automatically.
*/
Expand Down

0 comments on commit 6d11779

Please sign in to comment.