redis-conductor
Advanced tools
Comparing version 0.0.1 to 0.0.2
14
index.js
@@ -18,5 +18,7 @@ 'use strict'; | ||
if (opts.idSuffix !== undefined) { this._idString = `${this._idString}:${opts.idSuffix}`; } | ||
if (opts.intervalString === undefined) { opts.intervalString = '*/10 * * * * *'; } | ||
if (opts.crashOnError === undefined) { opts.crashOnError = true; } | ||
else if (opts.crashOnError === false && opts.exitOnError === undefined) { opts.exitOnError = true; } | ||
opts.crashOnError = opts.crashOnError || true; | ||
opts.host = opts.host || '127.0.0.1'; | ||
opts.intervalString = opts.intervalString || '*/10 * * * * *'; | ||
opts.port = opts.port || 6379; | ||
if (opts.crashOnError === false || opts.crashOnError === 'false') { opts.exitOnError = true; } | ||
if (opts.authPass !== undefined) { connOptions.auth_pass = opts.authPass; } | ||
@@ -27,3 +29,3 @@ let self = this; | ||
let errStr = JSON.stringify(e || 'undefined error'); | ||
logger.error(`${where} caught error: ${errStr}`); | ||
self._log.error(`${where} caught error: ${errStr}`); | ||
if (opts.crashOnError !== false) { | ||
@@ -35,4 +37,4 @@ throw new Error({ where: where, trace: e }); | ||
}; | ||
this._publisher = redis.createClient(opts.port || 6379, opts.host || '127.0.0.1', connOptions); | ||
this._subscriber = redis.createClient(opts.port || 6379, opts.host || '127.0.0.1', connOptions); | ||
this._publisher = redis.createClient(opts.port, opts.host, connOptions); | ||
this._subscriber = redis.createClient(opts.port, opts.host, connOptions); | ||
this._publisher.on('error', (e) => handleError('publisher', e)); | ||
@@ -39,0 +41,0 @@ this._subscriber.on('error', (e) => handleError('subscriber', e)); |
{ | ||
"name": "redis-conductor", | ||
"license": "BSD-3-Clause", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"dependencies": { | ||
"node-schedule": "1.2.5", | ||
"node-schedule": "1.3.0", | ||
"redis": "^2.8.0", | ||
@@ -8,0 +8,0 @@ "wraplog": "^0.0.2" |
Sorry, the diff of this file is not supported yet
137
10159
+ Addednode-schedule@1.3.0(transitive)
- Removednode-schedule@1.2.5(transitive)
Updatednode-schedule@1.3.0