| 4954 | } |
| 4955 | |
| 4956 | static 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") |
no test coverage detected