@nathapp/nestjs-redis 3.3.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +64 -0
- package/dist/lock.service.d.ts +3 -3
- package/dist/lock.service.js +11 -6
- package/dist/lock.service.js.map +1 -1
- package/dist/redis-client.provider.js +1 -1
- package/dist/redis-client.provider.js.map +1 -1
- package/dist/redis.module.js +10 -13
- package/dist/redis.module.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -213,4 +213,68 @@ interface RedisOptions {
|
|
|
213
213
|
showFriendlyErrorStack?: boolean;
|
|
214
214
|
}
|
|
215
215
|
```
|
|
216
|
+
|
|
217
|
+
Note: when `url` is set it is passed to ioredis alongside the remaining options, not
|
|
218
|
+
instead of them. Connection fields encoded in the URL win; everything else you supply
|
|
219
|
+
(`lazyConnect`, `tls`, `retryStrategy`, ...) still applies.
|
|
220
|
+
|
|
221
|
+
### Distributed locking
|
|
222
|
+
|
|
223
|
+
`RedisLockService` wraps [redlock](https://github.com/mike-marcacci/node-redlock). Use
|
|
224
|
+
`withLock` to run a routine under a lock that is always released:
|
|
225
|
+
|
|
226
|
+
```typescript
|
|
227
|
+
await this.lockService.withLock('onboarding:user-42', async () => {
|
|
228
|
+
await this.advanceOnboarding();
|
|
229
|
+
});
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
`acquireLock(name, expiryMs?)` / `releaseLock(token)` are available when the critical
|
|
233
|
+
section does not fit a callback. `acquireLock` returns a token identifying that specific
|
|
234
|
+
handle — pass the token, not the lock name, to `releaseLock`.
|
|
235
|
+
|
|
236
|
+
`withLock` and `acquireLock` both take an optional trailing `settings` argument that
|
|
237
|
+
overrides the module-wide settings for that call only (`releaseLock` does not):
|
|
238
|
+
|
|
239
|
+
```typescript
|
|
240
|
+
// this one call waits its turn; every other lock in the app still fails fast
|
|
241
|
+
await this.lockService.withLock('slow-job', run, 60000, { retryCount: 10 });
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
Module-wide settings are supplied once via `lockSettings` and are merged over the
|
|
245
|
+
defaults, so overriding one field leaves the others intact:
|
|
246
|
+
|
|
247
|
+
```typescript
|
|
248
|
+
RedisModule.register({
|
|
249
|
+
redisOptions: { url: 'redis://localhost:6379' },
|
|
250
|
+
lockSettings: { settings: { retryCount: 3 } },
|
|
251
|
+
})
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Note the nesting: once you pass `lockSettings`, the connection options must go under
|
|
255
|
+
`redisOptions`. Leaving them at the top level alongside `lockSettings` throws at
|
|
256
|
+
registration rather than silently connecting to the ioredis default host.
|
|
257
|
+
|
|
258
|
+
| Setting | Default | Meaning |
|
|
259
|
+
| --- | --- | --- |
|
|
260
|
+
| `retryCount` | `0` | Attempts before a contended acquisition throws. `0` fails fast; `-1` retries forever. |
|
|
261
|
+
| `retryDelay` | `200` | Base milliseconds between attempts. |
|
|
262
|
+
| `retryJitter` | `200` | Symmetric jitter: each delay is `retryDelay ± retryJitter`. |
|
|
263
|
+
| `driftFactor` | `0.01` | Multiplied by the lock TTL to determine clock drift allowance. |
|
|
264
|
+
| `automaticExtensionThreshold` | `500` | Only applies to redlock's `using()`, which this service does not call — currently inert. |
|
|
265
|
+
|
|
266
|
+
**The default is fail-fast**: `retryCount: 0` means a contended acquisition throws
|
|
267
|
+
immediately rather than waiting. This suits the try-lock pattern ("if this fails,
|
|
268
|
+
someone else owns it, skip") and never blocks a caller behind a peer.
|
|
269
|
+
|
|
270
|
+
It also means this service is **not** a drop-in for an in-process mutex that queues.
|
|
271
|
+
If a call site needs to wait its turn, opt into retries explicitly — per module via
|
|
272
|
+
`lockSettings`, or per call as shown above. Note redlock's own default is `retryCount:
|
|
273
|
+
10`; this package deliberately differs.
|
|
274
|
+
|
|
275
|
+
Each retry waits a random `[0, retryDelay + retryJitter)`ms, so `retryCount: 10` with
|
|
276
|
+
the defaults gives roughly two seconds of patience on average and up to about four.
|
|
277
|
+
Any wait is bounded — a lock is never queued indefinitely, and a holder whose process
|
|
278
|
+
dies blocks its key only until `expiryMs` (default 60s) elapses.
|
|
279
|
+
|
|
216
280
|
That's it!
|
package/dist/lock.service.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Logger, OnApplicationShutdown } from "@nestjs/common";
|
|
2
|
-
import Redlock, { Lock } from "redlock";
|
|
2
|
+
import Redlock, { Lock, Settings } from "redlock";
|
|
3
3
|
import { RedisService } from "./redis.service";
|
|
4
4
|
import { LockSettings } from "./lock.interface";
|
|
5
5
|
export declare class RedisLockService implements OnApplicationShutdown {
|
|
@@ -9,7 +9,7 @@ export declare class RedisLockService implements OnApplicationShutdown {
|
|
|
9
9
|
protected readonly locks: Map<string, Lock>;
|
|
10
10
|
constructor(redisService: RedisService, lockSettings?: LockSettings);
|
|
11
11
|
onApplicationShutdown(signal?: string): Promise<void>;
|
|
12
|
-
acquireLock(name: string, expiryMs?: number): Promise<string>;
|
|
12
|
+
acquireLock(name: string, expiryMs?: number, settings?: Partial<Settings>): Promise<string>;
|
|
13
13
|
releaseLock(token: string): Promise<void>;
|
|
14
|
-
withLock<T = any>(name: string, runWithLock: () => Promise<T>, expiryMs?: number): Promise<T>;
|
|
14
|
+
withLock<T = any>(name: string, runWithLock: () => Promise<T>, expiryMs?: number, settings?: Partial<Settings>): Promise<T>;
|
|
15
15
|
}
|
package/dist/lock.service.js
CHANGED
|
@@ -15,6 +15,10 @@ const crypto_1 = require("crypto");
|
|
|
15
15
|
const common_1 = require("@nestjs/common");
|
|
16
16
|
const redlock_1 = require("redlock");
|
|
17
17
|
const redis_service_1 = require("./redis.service");
|
|
18
|
+
function omitUndefined(settings) {
|
|
19
|
+
const defined = Object.entries(settings !== null && settings !== void 0 ? settings : {}).filter(([, value]) => value !== undefined);
|
|
20
|
+
return Object.fromEntries(defined);
|
|
21
|
+
}
|
|
18
22
|
let RedisLockService = RedisLockService_1 = class RedisLockService {
|
|
19
23
|
constructor(redisService, lockSettings) {
|
|
20
24
|
this.redisService = redisService;
|
|
@@ -27,17 +31,18 @@ let RedisLockService = RedisLockService_1 = class RedisLockService {
|
|
|
27
31
|
retryJitter: 200,
|
|
28
32
|
automaticExtensionThreshold: 500,
|
|
29
33
|
};
|
|
30
|
-
const { settings
|
|
31
|
-
|
|
34
|
+
const { settings, scripts } = lockSettings !== null && lockSettings !== void 0 ? lockSettings : {};
|
|
35
|
+
const merged = { ...defaultSettings, ...omitUndefined(settings) };
|
|
36
|
+
this.redLock = new redlock_1.default([this.redisService.getClient()], merged, scripts);
|
|
32
37
|
}
|
|
33
38
|
async onApplicationShutdown(signal) {
|
|
34
39
|
if (this.redLock) {
|
|
35
40
|
await this.redLock.quit();
|
|
36
41
|
}
|
|
37
42
|
}
|
|
38
|
-
async acquireLock(name, expiryMs = 60000) {
|
|
43
|
+
async acquireLock(name, expiryMs = 60000, settings) {
|
|
39
44
|
this.logger.log(`acquireLock redis Lock for ${name}`);
|
|
40
|
-
const lock = await this.redLock.acquire([name], expiryMs);
|
|
45
|
+
const lock = await this.redLock.acquire([name], expiryMs, omitUndefined(settings));
|
|
41
46
|
if (!lock) {
|
|
42
47
|
throw new Error(`Failed to acquire redis lock for ${name}`);
|
|
43
48
|
}
|
|
@@ -60,8 +65,8 @@ let RedisLockService = RedisLockService_1 = class RedisLockService {
|
|
|
60
65
|
}
|
|
61
66
|
}
|
|
62
67
|
}
|
|
63
|
-
async withLock(name, runWithLock, expiryMs = 60000) {
|
|
64
|
-
const token = await this.acquireLock(name, expiryMs);
|
|
68
|
+
async withLock(name, runWithLock, expiryMs = 60000, settings) {
|
|
69
|
+
const token = await this.acquireLock(name, expiryMs, settings);
|
|
65
70
|
try {
|
|
66
71
|
return await runWithLock();
|
|
67
72
|
}
|
package/dist/lock.service.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lock.service.js","sourceRoot":"","sources":["../lib/lock.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAA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AAC,KAAK,CAAC,CAAC;YAC3B,CAAC;QACH,CAAC;IACH,CAAC;IAEM,KAAK,CAAC,QAAQ,CACnB,IAAY,EACZ,WAA6B,EAC7B,QAAQ,GAAG,KAAK,EAChB,QAA4B;QAE5B,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC/D,IAAI,CAAC;YACH,OAAO,MAAM,WAAW,EAAE,CAAC;QAC7B,CAAC;QACD,OAAM,KAAK,EAAE,CAAC;YACZ,MAAM,KAAK,CAAC;QACd,CAAC;gBACO,CAAC;YACP,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAChC,CAAC;IACH,CAAC;CAEF,CAAA;AAhGY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;qCAQgC,4BAAY;GAP5C,gBAAgB,CAgG5B"}
|
|
@@ -9,7 +9,7 @@ class RedisClientError extends Error {
|
|
|
9
9
|
exports.RedisClientError = RedisClientError;
|
|
10
10
|
async function getClient(options) {
|
|
11
11
|
const { onClientReady, url, ...opt } = options;
|
|
12
|
-
const client = url ? new ioredis_1.Redis(url) : new ioredis_1.Redis(opt);
|
|
12
|
+
const client = url ? new ioredis_1.Redis(url, opt) : new ioredis_1.Redis(opt);
|
|
13
13
|
if (onClientReady) {
|
|
14
14
|
onClientReady(client);
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redis-client.provider.js","sourceRoot":"","sources":["../lib/redis-client.provider.ts"],"names":[],"mappings":";;;AAAA,qCAAgC;AAChC,+BAAoC;AAGpC,uDAAuE;AAGvE,MAAa,gBAAiB,SAAQ,KAAK;CAAG;AAA9C,4CAA8C;AAO9C,KAAK,UAAU,SAAS,CAAC,OAA2B;IAClD,MAAM,EAAE,aAAa,EAAE,GAAG,EAAE,GAAG,GAAG,EAAE,GAAG,OAAO,CAAC;
|
|
1
|
+
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gBAClB,OAAO,GAAG,CAAC;YACb,CAAC,CAAC,CAAC;YAEH,MAAM,OAAO,CAAC,GAAG,CACf,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE;gBAC7B,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,MAAM,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;YAC/C,CAAC,CAAC,CACH,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,IAAI,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC9C,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;YAC5B,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,MAAM,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;QACpD,CAAC;QAED,OAAO;YACL,UAAU;YACV,OAAO;YACP,IAAI,EAAE,OAAO,CAAC,IAAI;SACnB,CAAC;IACJ,CAAC;IACD,MAAM,EAAE,CAAC,sCAAoB,CAAC;CAC/B,CAAC,CAAC;AApCU,QAAA,YAAY,gBAoCtB;AAEI,MAAM,wBAAwB,GAAG,CAAC,OAAgC,EAAE,EAAE,CAAC,CAAC;IAC7E,OAAO,EAAE,sCAAoB;IAC7B,UAAU,EAAE,OAAO,CAAC,UAAU;IAC9B,MAAM,EAAE,OAAO,CAAC,MAAM;CACvB,CAAC,CAAC;AAJU,QAAA,wBAAwB,4BAIlC"}
|
package/dist/redis.module.js
CHANGED
|
@@ -13,21 +13,18 @@ const redis_core_module_1 = require("./redis-core.module");
|
|
|
13
13
|
const lock_service_1 = require("./lock.service");
|
|
14
14
|
const redis_service_1 = require("./redis.service");
|
|
15
15
|
const lock_constants_1 = require("./lock.constants");
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
automaticExtensionThreshold: 500,
|
|
23
|
-
},
|
|
24
|
-
};
|
|
16
|
+
function requireNestedRedisOptions(redisOptions) {
|
|
17
|
+
if (!redisOptions) {
|
|
18
|
+
throw new Error('RedisModule: when `lockSettings` is supplied, connection options must be nested under `redisOptions`.');
|
|
19
|
+
}
|
|
20
|
+
return redisOptions;
|
|
21
|
+
}
|
|
25
22
|
let RedisModule = RedisModule_1 = class RedisModule {
|
|
26
23
|
static register(options) {
|
|
27
24
|
let redisOptions;
|
|
28
25
|
let lockSettings;
|
|
29
26
|
if (this.isRegisterOptions(options)) {
|
|
30
|
-
redisOptions = options.redisOptions;
|
|
27
|
+
redisOptions = requireNestedRedisOptions(options.redisOptions);
|
|
31
28
|
lockSettings = options.lockSettings;
|
|
32
29
|
}
|
|
33
30
|
else {
|
|
@@ -35,7 +32,7 @@ let RedisModule = RedisModule_1 = class RedisModule {
|
|
|
35
32
|
}
|
|
36
33
|
const lockSetting = {
|
|
37
34
|
provide: lock_constants_1.LOCK_SETTINGS,
|
|
38
|
-
useValue: lockSettings
|
|
35
|
+
useValue: lockSettings !== null && lockSettings !== void 0 ? lockSettings : {},
|
|
39
36
|
};
|
|
40
37
|
const lockService = this.createDefaultLockService();
|
|
41
38
|
return {
|
|
@@ -49,7 +46,7 @@ let RedisModule = RedisModule_1 = class RedisModule {
|
|
|
49
46
|
let redisOptions;
|
|
50
47
|
let lockSettings;
|
|
51
48
|
if (this.isRegisterAsyncOptions(options)) {
|
|
52
|
-
redisOptions = options.redisOptions;
|
|
49
|
+
redisOptions = requireNestedRedisOptions(options.redisOptions);
|
|
53
50
|
lockSettings = options.lockSettings;
|
|
54
51
|
}
|
|
55
52
|
else {
|
|
@@ -57,7 +54,7 @@ let RedisModule = RedisModule_1 = class RedisModule {
|
|
|
57
54
|
}
|
|
58
55
|
const lockSetting = {
|
|
59
56
|
provide: lock_constants_1.LOCK_SETTINGS,
|
|
60
|
-
useValue: lockSettings
|
|
57
|
+
useValue: lockSettings !== null && lockSettings !== void 0 ? lockSettings : {},
|
|
61
58
|
};
|
|
62
59
|
const lockService = this.createDefaultLockService();
|
|
63
60
|
return {
|
package/dist/redis.module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redis.module.js","sourceRoot":"","sources":["../lib/redis.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAiE;AAEjE,2DAAsD;AACtD,iDAAkD;AAClD,mDAA+C;AAE/C,qDAAiD;
|
|
1
|
+
{"version":3,"file":"redis.module.js","sourceRoot":"","sources":["../lib/redis.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAiE;AAEjE,2DAAsD;AACtD,iDAAkD;AAClD,mDAA+C;AAE/C,qDAAiD;AAsBjD,SAAS,yBAAyB,CAAI,YAA2B;IAC/D,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CACb,uGAAuG,CACxG,CAAC;IACJ,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC;AAGM,IAAM,WAAW,mBAAjB,MAAM,WAAW;IACtB,MAAM,CAAC,QAAQ,CACb,OAAyE;QAGzE,IAAI,YAAuD,CAAC;QAC5D,IAAI,YAAsC,CAAC;QAE3C,IAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,CAAC;YACnC,YAAY,GAAG,yBAAyB,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YAC/D,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;QACtC,CAAC;aAAM,CAAC;YACN,YAAY,GAAG,OAAO,CAAC;QACzB,CAAC;QAED,MAAM,WAAW,GAAa;YAC5B,OAAO,EAAE,8BAAa;YACtB,QAAQ,EAAE,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,EAAE;SAC7B,CAAA;QAED,MAAM,WAAW,GAAG,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAEpD,OAAO;YACL,MAAM,EAAE,aAAW;YACnB,OAAO,EAAE,CAAC,mCAAe,CAAC,QAAQ,CAAC,Y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