Skip to content

Commit

Permalink
Merge pull request #3 from MShel/2-pass-job-name-key-as-array
Browse files Browse the repository at this point in the history
Fixing issue where redLock expects array and we pass string
  • Loading branch information
cpaczek authored Nov 8, 2023
2 parents fe0b735 + 3b31dee commit f43d7f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = ({ strapi }) => {

let lock
try {
lock = await redlock.acquire(name, config.lockTTL)
lock = await redlock.acquire([name], config.lockTTL)
debug(`Job ${name} acquired lock`)
await originalFunction(...args)
} catch (e) {
Expand Down

0 comments on commit f43d7f2

Please sign in to comment.