MCPcopy Create free account
hub / github.com/F-Stack/f-stack / moduleLoadFromQueue

Function moduleLoadFromQueue

app/redis-6.2.6/src/module.c:8492–8508  ·  view source on GitHub ↗

Load all the modules in the server.loadmodule_queue list, which is * populated by `loadmodule` directives in the configuration file. * We can't load modules directly when processing the configuration file * because the server must be fully initialized before loading modules. * * The function aborts the server on errors, since to start with missing * modules is not considered sane: clients ma

Source from the content-addressed store, hash-verified

8490 * given commands, loading AOF also may need some modules to exist, and
8491 * if this instance is a slave, it must understand commands from master. */
8492void moduleLoadFromQueue(void) {
8493 listIter li;
8494 listNode *ln;
8495
8496 listRewind(server.loadmodule_queue,&li);
8497 while((ln = listNext(&li))) {
8498 struct moduleLoadQueueEntry *loadmod = ln->value;
8499 if (moduleLoad(loadmod->path,(void **)loadmod->argv,loadmod->argc)
8500 == C_ERR)
8501 {
8502 serverLog(LL_WARNING,
8503 "Can't load module from %s: server aborting",
8504 loadmod->path);
8505 exit(1);
8506 }
8507 }
8508}
8509
8510void moduleFreeModuleStructure(struct RedisModule *module) {
8511 listRelease(module->types);

Callers 1

mainFunction · 0.85

Calls 3

listRewindFunction · 0.85
listNextFunction · 0.85
moduleLoadFunction · 0.85

Tested by

no test coverage detected