Delay mod import until plugin service start
This commit is contained in:
parent
f7089cdfa5
commit
6aef53bad6
1 changed files with 4 additions and 6 deletions
|
|
@ -48,7 +48,7 @@ SERVER_RESTART = os.path.join(settings.GAME_DIR, "server", 'server.restart')
|
||||||
SERVER_STARTSTOP_MODULE = mod_import(settings.AT_SERVER_STARTSTOP_MODULE)
|
SERVER_STARTSTOP_MODULE = mod_import(settings.AT_SERVER_STARTSTOP_MODULE)
|
||||||
|
|
||||||
# modules containing plugin services
|
# modules containing plugin services
|
||||||
SERVER_SERVICES_PLUGIN_MODULES = [mod_import(module) for module in make_iter(settings.SERVER_SERVICES_PLUGIN_MODULES)]
|
SERVER_SERVICES_PLUGIN_MODULES = make_iter(settings.SERVER_SERVICES_PLUGIN_MODULES)
|
||||||
|
|
||||||
|
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
|
|
@ -598,11 +598,9 @@ if ENABLED:
|
||||||
INFO_DICT["irc_rss"] = ", ".join(ENABLED) + " enabled."
|
INFO_DICT["irc_rss"] = ", ".join(ENABLED) + " enabled."
|
||||||
|
|
||||||
for plugin_module in SERVER_SERVICES_PLUGIN_MODULES:
|
for plugin_module in SERVER_SERVICES_PLUGIN_MODULES:
|
||||||
# external plugin protocols
|
# external plugin protocols - load here
|
||||||
try:
|
plugin_module = mod_import(plugin_module)
|
||||||
plugin_module.start_plugin_services(EVENNIA)
|
plugin_module.start_plugin_services(EVENNIA)
|
||||||
except AttributeError as err:
|
|
||||||
raise AttributeError(f"Error loading plugin module {plugin_module}: {err}")
|
|
||||||
|
|
||||||
# clear server startup mode
|
# clear server startup mode
|
||||||
ServerConfig.objects.conf("server_starting_mode", delete=True)
|
ServerConfig.objects.conf("server_starting_mode", delete=True)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue