From d04f8fc790d8feb31d45f4abb4b1edf0dc067d85 Mon Sep 17 00:00:00 2001 From: ynerant Date: Tue, 11 May 2021 17:38:09 +0200 Subject: [PATCH] =?UTF-8?q?Rechargement=20=C3=A0=20chaud=20de=20la=20confi?= =?UTF-8?q?guration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ynerant --- chronodose.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/chronodose.py b/chronodose.py index fbb26c1..45b7d96 100755 --- a/chronodose.py +++ b/chronodose.py @@ -150,6 +150,11 @@ def main(): irc_client.privmsg(config.irc.channel, ' '.join(str(a) for a in mesg)) while True: + # Rechargement de la configuration + with open('config.yml') as f: + config = yaml.safe_load(f) + config = Config(**config) + centres_id = [] # Centres disponibles for search in config.search: @@ -183,7 +188,7 @@ def main(): already_indicated.remove(centre_id) # 5 minutes - sleep(300) + sleep(config.delay) if __name__ == '__main__':