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

Function RedisGearsPy_BackgroundExecute

plugins/python/redisgears_python.c:4956–4974  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4954}
4955
4956static void RedisGearsPy_BackgroundExecute(PythonSessionCtx* session,
4957 PythonSessionCtx* oldSession,
4958 RedisModuleBlockedClient *bc,
4959 const char* script,
4960 DoneCallbackFunction doneFunction,
4961 bool isBlocking){
4962
4963 BackgroundDepsInstallCtx* bdiCtx = RG_ALLOC(sizeof(*bdiCtx));
4964 *bdiCtx = (BackgroundDepsInstallCtx){
4965 .session = session,
4966 .oldSession = oldSession,
4967 .bc = bc,
4968 .script = RG_STRDUP(script),
4969 .doneFunction = doneFunction,
4970 .isBlocking = isBlocking,
4971 };
4972
4973 Gears_thpool_add_work(installDepsPool, RedisGearsPy_DownloadWheelsAndDistribute, bdiCtx);
4974}
4975
4976#define CLUSTER_ERROR "ERRCLUSTER"
4977#define VERIFY_CLUSTER_INITIALIZE(c) if(!RedisGears_ClusterIsInitialized()) return RedisModule_ReplyWithError(c, CLUSTER_ERROR" Uninitialized cluster state")

Callers 1

RedisGearsPy_ExecuteFunction · 0.85

Calls 1

Gears_thpool_add_workFunction · 0.85

Tested by

no test coverage detected