@kokosro/stm
Advanced tools
Comparing version 1.0.0 to 1.1.0
18
index.js
@@ -5,5 +5,13 @@ const Ioredis = require('ioredis'); | ||
const defaultOptions = { | ||
driftFactor: 0.01, | ||
retryCount: 100, | ||
retryDelay: 20, | ||
retryJitter: 50, | ||
automaticExtensionThreshold: 500, | ||
}; | ||
class Stm extends EventEmitter { | ||
constructor(redisUrl) { | ||
constructor(redisUrl, options = {}) { | ||
super(); | ||
this.options = Object.assign(options || {}, defaultOptions); | ||
this.redis = new Ioredis(redisUrl); | ||
@@ -39,9 +47,3 @@ this.prefixes = { | ||
[this.redis], | ||
{ | ||
driftFactor: 0.01, | ||
retryCount: 40, | ||
retryDelay: 200, | ||
retryJitter: 200, | ||
automaticExtensionThreshold: 500, | ||
}, | ||
this.options, | ||
); | ||
@@ -48,0 +50,0 @@ |
{ | ||
"name": "@kokosro/stm", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Redis Short Term Memory", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7524
194