| 4653 | } |
| 4654 | |
| 4655 | static PyObject* callNext(PyObject *cls, PyObject *args){ |
| 4656 | PythonThreadCtx* ptctx = GetPythonThreadCtx(); |
| 4657 | RedisGears_LockHanlderAcquire(staticCtx); |
| 4658 | |
| 4659 | CommandReaderTriggerCtx* crtCtx = getCommandReaderTriggerCtx(ptctx);; |
| 4660 | |
| 4661 | if(!crtCtx){ |
| 4662 | PyErr_SetString(GearsError, "Can not get CommandHook ctx"); |
| 4663 | RedisGears_LockHanlderRelease(staticCtx); |
| 4664 | return NULL; |
| 4665 | } |
| 4666 | |
| 4667 | RedisModuleString** arguments = createArgs(args); |
| 4668 | |
| 4669 | RedisModuleCallReply* reply = RedisGears_CommandReaderTriggerCtxNext(crtCtx, arguments, array_len(arguments)); |
| 4670 | |
| 4671 | PyObject* res = createReply(reply); |
| 4672 | |
| 4673 | array_free_ex(arguments, RedisModule_FreeString(NULL, *(RedisModuleString**)ptr)); |
| 4674 | |
| 4675 | RedisGears_LockHanlderRelease(staticCtx); |
| 4676 | return res; |
| 4677 | } |
| 4678 | |
| 4679 | PyMethodDef EmbRedisGearsMethods[] = { |
| 4680 | {"gearsCtx", gearsCtx, METH_VARARGS, "creating an empty gears context"}, |
nothing calls this directly
no test coverage detected