Skip to content

Commit 513c36e

Browse files
committed
fix: use ioredis-lock with jitter
1 parent 73d35df commit 513c36e

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
},
4444
"dependencies": {
4545
"@microfleet/callback-queue": "^4.0.2",
46-
"@microfleet/ioredis-lock": "^5.0.4",
46+
"@microfleet/ioredis-lock": "^5.1.0",
4747
"bluebird": "^3.7.2",
4848
"denque": "^2.0.1",
4949
"lodash": "^4.17.21",

pnpm-lock.yaml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/distributed-callback-queue.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ export class DistributedCallbackQueue {
9191

9292
const lockOptions = defaults(options.lock || {}, {
9393
timeout: 10000,
94-
retries: 2,
94+
retries: 3,
95+
jitter: 1.5,
9596
delay: 100,
9697
})
9798

0 commit comments

Comments
 (0)