3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-25 04:02:45 +01:00

control: log the start and end of rehash to INFO

This commit is contained in:
James Lu 2017-06-02 08:46:27 -07:00
parent 60a0bcdc7a
commit f80c5df971

View File

@ -84,6 +84,7 @@ signal.signal(signal.SIGINT, sigterm_handler)
def _rehash(): def _rehash():
"""Rehashes the PyLink daemon.""" """Rehashes the PyLink daemon."""
log.info('Reloading PyLink configuration...')
old_conf = conf.conf.copy() old_conf = conf.conf.copy()
fname = conf.fname fname = conf.fname
new_conf = conf.loadConf(fname, errors_fatal=False, logger=log) new_conf = conf.loadConf(fname, errors_fatal=False, logger=log)
@ -130,6 +131,7 @@ def _rehash():
if (network not in world.networkobjects) or (not world.networkobjects[network].connection_thread.is_alive()): if (network not in world.networkobjects) or (not world.networkobjects[network].connection_thread.is_alive()):
proto = utils.getProtocolModule(sdata['protocol']) proto = utils.getProtocolModule(sdata['protocol'])
world.networkobjects[network] = classes.Irc(network, proto, new_conf) world.networkobjects[network] = classes.Irc(network, proto, new_conf)
log.info('Finished reloading PyLink configuration.')
if os.name == 'posix': if os.name == 'posix':
# Only register SIGHUP on *nix. # Only register SIGHUP on *nix.