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

Function runCreateKeysReaderArgs

plugins/python/redisgears_python.c:1499–1523  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1497}
1498
1499static void* runCreateKeysReaderArgs(const char* pattern, PyObject *kargs){
1500 bool noScan = false;
1501 PyObject* pyNoScan = GearsPyDict_GetItemString(kargs, "noScan");
1502 if(pyNoScan){
1503 if(!PyBool_Check(pyNoScan)){
1504 PyErr_SetString(GearsError, "exactMatch value is not boolean");
1505 return NULL;
1506 }
1507 if(pyNoScan == Py_True){
1508 noScan = true;
1509 }
1510 }
1511 bool readValue = true;
1512 PyObject* pyReadValue = GearsPyDict_GetItemString(kargs, "readValue");
1513 if(pyReadValue){
1514 if(!PyBool_Check(pyReadValue)){
1515 PyErr_SetString(GearsError, "readValue value is not boolean");
1516 return NULL;
1517 }
1518 if(pyReadValue == Py_False){
1519 readValue = false;
1520 }
1521 }
1522 return RedisGears_KeysReaderCtxCreate(pattern, readValue, NULL, noScan);
1523}
1524
1525static PyObject* run(PyObject *self, PyObject *args, PyObject *kargs){
1526 PythonThreadCtx* ptctx = GetPythonThreadCtx();

Callers 1

runFunction · 0.85

Calls 1

Tested by

no test coverage detected