Skip to content

Commit

Permalink
fix: use ioredis-lock with jitter
Browse files Browse the repository at this point in the history
  • Loading branch information
AVVS committed Feb 4, 2022
1 parent 73d35df commit 513c36e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
},
"dependencies": {
"@microfleet/callback-queue": "^4.0.2",
"@microfleet/ioredis-lock": "^5.0.4",
"@microfleet/ioredis-lock": "^5.1.0",
"bluebird": "^3.7.2",
"denque": "^2.0.1",
"lodash": "^4.17.21",
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

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

3 changes: 2 additions & 1 deletion src/distributed-callback-queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ export class DistributedCallbackQueue {

const lockOptions = defaults(options.lock || {}, {
timeout: 10000,
retries: 2,
retries: 3,
jitter: 1.5,
delay: 100,
})

Expand Down

0 comments on commit 513c36e

Please sign in to comment.