From 49bed6595d27e711c3521708597373bf6900bfea Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Tue, 9 Feb 2021 12:42:58 +0000 Subject: [PATCH] added queueKey to error info when trying to push to redis --- .../app/js/DocumentUpdaterManager.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/services/real-time/app/js/DocumentUpdaterManager.js b/services/real-time/app/js/DocumentUpdaterManager.js index 0aa0d23466..39bef96ebd 100644 --- a/services/real-time/app/js/DocumentUpdaterManager.js +++ b/services/real-time/app/js/DocumentUpdaterManager.js @@ -132,18 +132,15 @@ const DocumentUpdaterManager = { error = new OError('error pushing update into redis').withCause(error) return callback(error) } - rclient.rpush( - DocumentUpdaterManager._getPendingUpdateListKey(), - doc_key, - function (error) { - if (error) { - error = new OError('error pushing doc_id into redis').withCause( - error - ) - } - callback(error) + const queueKey = DocumentUpdaterManager._getPendingUpdateListKey() + rclient.rpush(queueKey, doc_key, function (error) { + if (error) { + error = new OError('error pushing doc_id into redis') + .withInfo({ queueKey }) + .withCause(error) } - ) + callback(error) + }) }) } }