From dfe9cd985d459ed8817e566128c187e5f10e654d Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 16 Apr 2025 18:42:58 +0200 Subject: [PATCH] feat(assist-server): use sendCommand for SADD --- ee/assist-server/app/cache.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ee/assist-server/app/cache.js b/ee/assist-server/app/cache.js index a6d7b127a..d8cb79553 100644 --- a/ee/assist-server/app/cache.js +++ b/ee/assist-server/app/cache.js @@ -118,7 +118,9 @@ const updateNodeCache = async function (io) { await pipeline.exec(); } // add recently updated sessions - await redisClient.sadd(`assist:updated_sessions`, JSON.stringify(toUpdate)); + if (toUpdate.length > 0) { + await redisClient.sendCommand(['SADD','assist:updated_sessions', ...toUpdate]); + } // store the node sessions await redisClient.set(`assist:nodes:${nodeID}:sessions`, JSON.stringify(Array.from(sessionIDs)), {EX: cacheRefreshInterval});