Put daemonstate to shutdown when stopping

This way it isn't "run" all the way until it shuts down.
This commit is contained in:
Joshua Boniface 2019-06-19 14:23:07 -04:00
parent 39a45a1e0f
commit 0060c0313b
1 changed files with 3 additions and 0 deletions

View File

@ -472,6 +472,9 @@ zk_conn.add_listener(zk_listener)
def cleanup(): def cleanup():
global zk_conn, update_timer, d_domains global zk_conn, update_timer, d_domains
# Set stop state in Zookeeper
zkhandler.writedata(zk_conn, { '/nodes/{}/daemonstate'.format(myhostname): 'shutdown' })
logger.out('Performing final keepalive update', state='s') logger.out('Performing final keepalive update', state='s')
update_zookeeper() update_zookeeper()