Rechargement à chaud de la configuration
Signed-off-by: ynerant <ynerant@zamokv5.crans.org>
This commit is contained in:
parent
3484ee3b9c
commit
d04f8fc790
|
@ -150,6 +150,11 @@ def main():
|
||||||
irc_client.privmsg(config.irc.channel, ' '.join(str(a) for a in mesg))
|
irc_client.privmsg(config.irc.channel, ' '.join(str(a) for a in mesg))
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
# Rechargement de la configuration
|
||||||
|
with open('config.yml') as f:
|
||||||
|
config = yaml.safe_load(f)
|
||||||
|
config = Config(**config)
|
||||||
|
|
||||||
centres_id = [] # Centres disponibles
|
centres_id = [] # Centres disponibles
|
||||||
|
|
||||||
for search in config.search:
|
for search in config.search:
|
||||||
|
@ -183,7 +188,7 @@ def main():
|
||||||
already_indicated.remove(centre_id)
|
already_indicated.remove(centre_id)
|
||||||
|
|
||||||
# 5 minutes
|
# 5 minutes
|
||||||
sleep(300)
|
sleep(config.delay)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Reference in New Issue