MCPcopy Create free account
hub / github.com/RedisGears/RedisGears / Python_SetCurrSession

Function Python_SetCurrSession

plugins/python/redisgears_python.c:7447–7461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7445}
7446
7447static void Python_SetCurrSession(void *s, bool onlyFree){
7448 if (onlyFree) {
7449 PythonSessionCtx_Free(s);
7450 return;
7451 }
7452 if (!s) {
7453 RedisGearsPy_AddSessionRequirementsToDict(currentSession);
7454
7455 PythonSessionCtx_Set(currentSession);
7456 PythonSessionCtx_Free(currentSession);
7457 currentSession = NULL;
7458 } else {
7459 currentSession = s;
7460 }
7461}
7462
7463static void* Python_DeserializeSession(Gears_BufferReader *br, char **err) {
7464 long version = RedisGears_BRReadLong(br);

Callers

nothing calls this directly

Calls 3

PythonSessionCtx_FreeFunction · 0.85
PythonSessionCtx_SetFunction · 0.85

Tested by

no test coverage detected