feat(assist-server): use sendCommand for SADD

This commit is contained in:
Alexander 2025-04-16 18:42:58 +02:00
parent edafda9f97
commit dfe9cd985d

View file

@ -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});