Put daemonstate to shutdown when stopping
This way it isn't "run" all the way until it shuts down.
This commit is contained in:
parent
39a45a1e0f
commit
0060c0313b
|
@ -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()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue