Load all the modules in the g_pserver->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: client
| 8690 | * given commands, loading AOF also may need some modules to exist, and |
| 8691 | * if this instance is a replica, it must understand commands from master. */ |
| 8692 | void moduleLoadFromQueue(void) { |
| 8693 | listIter li; |
| 8694 | listNode *ln; |
| 8695 | |
| 8696 | listRewind(g_pserver->loadmodule_queue,&li); |
| 8697 | while((ln = listNext(&li))) { |
| 8698 | struct moduleLoadQueueEntry *loadmod = (moduleLoadQueueEntry*)ln->value; |
| 8699 | if (moduleLoad(loadmod->path,(void **)loadmod->argv,loadmod->argc) |
| 8700 | == C_ERR) |
| 8701 | { |
| 8702 | serverLog(LL_WARNING, |
| 8703 | "Can't load module from %s: server aborting", |
| 8704 | loadmod->path); |
| 8705 | exit(1); |
| 8706 | } |
| 8707 | } |
| 8708 | } |
| 8709 | |
| 8710 | void moduleFreeModuleStructure(struct RedisModule *module) { |
| 8711 | listRelease(module->types); |
no test coverage detected