mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
Merge pull request #18906 from overleaf/em-migrate-existing-histories-2
History ranges migration script - second attempt GitOrigin-RevId: 60a2c04e2a72e76a58e9e179fefc4186a96fde32
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
const { callbackify, promisify } = require('util')
|
||||
const metrics = require('@overleaf/metrics')
|
||||
const logger = require('@overleaf/logger')
|
||||
const os = require('os')
|
||||
@@ -31,6 +32,14 @@ module.exports = class RedisWebLocker {
|
||||
this.SLOW_EXECUTION_THRESHOLD = options.slowExecutionThreshold || 5000
|
||||
// read-only copy for unit tests
|
||||
this.unlockScript = UNLOCK_SCRIPT
|
||||
|
||||
const promisifiedRunWithLock = promisify(this.runWithLock).bind(this)
|
||||
this.promises = {
|
||||
runWithLock(namespace, id, runner) {
|
||||
const cbRunner = callbackify(runner)
|
||||
return promisifiedRunWithLock(namespace, id, cbRunner)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// Use a signed lock value as described in
|
||||
|
||||
Reference in New Issue
Block a user