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
| 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. */ |
| 8492 | void 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 | |
| 8510 | void moduleFreeModuleStructure(struct RedisModule *module) { |
| 8511 | listRelease(module->types); |
no test coverage detected