MCPcopy Create free account
hub / github.com/CloudBoost/cloudboost / saveSession

Function saveSession

helpers/socketSession.js:36–45  ·  view source on GitHub ↗
(socketId, sessionId, callback)

Source from the content-addressed store, hash-verified

34 /* Attaches the socketId to the session of the user.
35 */
36 saveSession(socketId, sessionId, callback) {
37 try {
38 config.redisClient.set(`cb-socket-${socketId}`, sessionId, (err, reply) => {
39 config.redisClient.expire(`cb-socket-${socketId}`, 30 * 24 * 60 * 60);
40 if (callback) callback(err, reply);
41 });
42 } catch (err) {
43 winston.log('error', { error: String(err), stack: new Error().stack });
44 }
45 },
46
47 deleteSession(socketId, callback) {
48 try {

Callers

nothing calls this directly

Calls 2

callbackFunction · 0.50
setMethod · 0.45

Tested by

no test coverage detected