Reload bot config (on USR1) on the main thread
This commit is contained in:
parent
dba4c9561c
commit
71775803d0
1 changed files with 3 additions and 0 deletions
|
@ -27,6 +27,9 @@ class Module(ModuleManager.BaseModule):
|
|||
lambda event: self.bot.disconnect(event["server"]))
|
||||
|
||||
def SIGUSR1(self, signum, frame):
|
||||
self.bot.trigger(self._reload_config)
|
||||
|
||||
def _reload_config(self):
|
||||
self.bot.log.info("Reloading config file", [])
|
||||
self.bot.config.load()
|
||||
self.bot.log.info("Reloaded config file", [])
|
||||
|
|
Loading…
Reference in a new issue