Update reloading config on USR1

This commit is contained in:
jesopo 2018-09-02 11:43:52 +01:00
parent cc1b4e6fde
commit 21abbc33c8

View file

@ -1,4 +1,5 @@
import signal import signal
import Config
class Module(object): class Module(object):
def __init__(self, bot, events): def __init__(self, bot, events):
@ -23,5 +24,7 @@ class Module(object):
self.bot.running = False self.bot.running = False
def SIGUSR1(self, signum, frame): def SIGUSR1(self, signum, frame):
print("Reloading config file") self.bot.log.info("Reloading config file", [])
self.bot.config_object.load_config() config = Config.Config(self.bot, self.bot.args.config)
self.bot.config = config.load_config()
self.bot.log.info("Reloaded config file", [])