feat(assist-server): use sendCommand for SADD
This commit is contained in:
parent
edafda9f97
commit
dfe9cd985d
1 changed files with 3 additions and 1 deletions
|
|
@ -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});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue