Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from hapinessjs/next
release(version): v1.1.0
- Loading branch information
Showing
12 changed files
with
314 additions
and
105 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
import { RetryStrategy, RetryStrategyOptions } from 'redis'; | ||
|
||
const debug = require('debug')('hapiness:redis'); | ||
|
||
export class DefaultValues { | ||
|
||
public static RECONNECT_INTERVAL = 5000; | ||
|
||
public static RETRY_STRATEGY(reconnect_interval?: number): RetryStrategy { | ||
return (opts: RetryStrategyOptions): number | Error => | ||
reconnect_interval || DefaultValues.RECONNECT_INTERVAL; | ||
return (opts: RetryStrategyOptions): number | Error => { | ||
debug('RETRY CONNECT'); | ||
return reconnect_interval || DefaultValues.RECONNECT_INTERVAL | ||
}; | ||
} | ||
|
||
} |
Oops, something went wrong.