(socketId, eventType, callback)
| 26 | * @callback : A query which is a string.. |
| 27 | */ |
| 28 | getData(socketId, eventType, callback) { |
| 29 | try { |
| 30 | config.redisClient.get(`cb-socket-${socketId}-data${eventType}`, (err, reply) => { |
| 31 | callback(err, JSON.parse(reply)); |
| 32 | }); |
| 33 | } catch (err) { |
| 34 | winston.log('error', { |
| 35 | error: String(err), |
| 36 | stack: new Error().stack, |
| 37 | }); |
| 38 | } |
| 39 | }, |
| 40 | |
| 41 | /* Attaches the socketId to the query of the user. |
| 42 | */ |