-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Right now there's the setup:
connector.py makes an irc <-> unix file socket bridge
bot.py makes a unix file <-> all plugins bridge
This would be nice except if you rerun connector.py the irc registration fails because the first instance is running. But it does overwrite the file socket, which means no future versions of bot.py can run properly until you shut down the connector.py. delete the unix file socket. and then restart connector.py.
This also has the side effect of shutting down a single plugin or loading a new one dynamically isn't doable. ALL plugins are loaded or killed together. This is super sadface.
The solution for this is going to be to rework the logic of how the bot starts up and manages plugins.
My current vision is just to pull the irc connection (and reconnection?) logic into the same code that kicks off plugins. Plugins are run as multiprocessing.process's that are just restarted upon death. Dynamic plugin changes (add/remove/reload) should then be pretty simple.