mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
Remove returns of promises within functions with callbacks (address DeprecationWarning) (#25603)
* [document-updater] Don't return promises within functions with callbacks Remove the errors: DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake https://cloudlogging.app.goo.gl/YHDhoarvLEw2w9rXA * Remove some more unnecessary returns in functions with callbacks, for consistency * Add `sendCanaryAppliedOp` to excluded methods for promisification GitOrigin-RevId: fa6d3e47c4e6561dc29d4c15e57c3289fc1f3dfa
This commit is contained in:
@@ -49,7 +49,7 @@ const RealTimeRedisManager = {
|
||||
MAX_OPS_PER_ITERATION,
|
||||
-1
|
||||
)
|
||||
return multi.exec(function (error, replys) {
|
||||
multi.exec(function (error, replys) {
|
||||
if (error != null) {
|
||||
return callback(error)
|
||||
}
|
||||
@@ -80,7 +80,7 @@ const RealTimeRedisManager = {
|
||||
},
|
||||
|
||||
getUpdatesLength(docId, callback) {
|
||||
return rclient.llen(Keys.pendingUpdates({ doc_id: docId }), callback)
|
||||
rclient.llen(Keys.pendingUpdates({ doc_id: docId }), callback)
|
||||
},
|
||||
|
||||
sendCanaryAppliedOp({ projectId, docId, op }) {
|
||||
@@ -132,5 +132,5 @@ const RealTimeRedisManager = {
|
||||
|
||||
module.exports = RealTimeRedisManager
|
||||
module.exports.promises = promisifyAll(RealTimeRedisManager, {
|
||||
without: ['sendData'],
|
||||
without: ['sendCanaryAppliedOp', 'sendData'],
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user