Print out interval

This commit is contained in:
Joshua Boniface 2018-06-17 02:28:39 -04:00
parent 9c4475d4f9
commit 837d134f4a
1 changed files with 3 additions and 2 deletions

View File

@ -223,9 +223,10 @@ update_zookeeper = this_node.update_zookeeper
# Create timer to update this node in Zookeeper
def createKeepaliveTimer():
ansiiprint.echo('Starting keepalive timer', '', 'o')
interval = int(config['keepalive_interval'])
ansiiprint.echo('Starting keepalive timer ({} second intervals)'.format(interval), '', 'o')
update_timer = apscheduler.schedulers.background.BackgroundScheduler()
update_timer.add_job(update_zookeeper, 'interval', seconds=int(config['keepalive_interval']))
update_timer.add_job(update_zookeeper, 'interval', seconds=interval)
update_timer.start()
return update_timer