Skip to content

Commit

Permalink
Merge pull request #8 from hapinessjs/next
Browse files Browse the repository at this point in the history
release(version): v1.1.0
  • Loading branch information
akanass committed Mar 28, 2018
2 parents 1ed0061 + 94d3c58 commit 89e9bb3
Show file tree
Hide file tree
Showing 12 changed files with 314 additions and 105 deletions.
130 changes: 70 additions & 60 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "@hapiness/redis",
"version": "1.0.2",
"version": "1.1.0",
"description": "Hapiness module for redis",
"main": "commonjs/index.js",
"types": "index.d.ts",
Expand Down Expand Up @@ -77,23 +77,23 @@
"redis-commands": "^1.3.1"
},
"devDependencies": {
"@hapiness/core": "1.3.0",
"@hapiness/core": "~1.5.0",
"@types/fs-extra": "^5.0.0",
"coveralls": "^3.0.0",
"fs-extra": "^5.0.0",
"istanbul": "^1.1.0-alpha.1",
"mocha": "^4.0.1",
"mocha-typescript": "^1.1.12",
"rimraf": "^2.6.2",
"rxjs": "^5.5.6",
"rxjs": "^5.5.7",
"ts-node": "^3.3.0",
"tslint": "^5.8.0",
"typescript": "^2.6.2",
"unit.js": "^2.0.0"
},
"peerDependencies": {
"@hapiness/core": "1.3.0",
"rxjs": "^5.5.6"
"@hapiness/core": "^1.5.0",
"rxjs": "^5.5.7"
},
"engines": {
"node": ">=7.0.0"
Expand Down
8 changes: 6 additions & 2 deletions src/module/common/default-values.ts
@@ -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
};
}

}

0 comments on commit 89e9bb3

Please sign in to comment.