def main(self): c = Cluster() cprint('Linking services and checks', color='green') c.link_services() c.link_checks() cprint('Launching listeners', color='green') c.launch_listeners() cprint('Joining seeds nodes', color='green') c.join() cprint('Starting check and generator threads', color='green') c.launch_check_thread() c.launch_generator_thread() if 'kv' in c.tags: c.launch_replication_backlog_thread() c.launch_replication_first_sync_thread() if 'ts' in c.tags: c.start_ts_listener() # Blocking function here c.main()
def f(port, name, bootstrap, seeds, tags, cfg_dir, libexec_dir): print 'hello', port, name, bootstrap, seeds, tags, cfg_dir, libexec_dir c = Cluster(int(port), name, bootstrap, seeds, tags, cfg_dir, libexec_dir) #node = c.get_boostrap_node() #c.set_alive(node, bootstrap=True) c.link_services() c.link_checks() c.launch_listeners() c.join() c.launch_check_thread() c.launch_collector_thread() c.launch_generator_thread() if 'kv' in tags.split(','): c.launch_replication_backlog_thread() c.launch_replication_first_sync_thread() if 'ts' in tags.split(','): c.start_ts_listener() c.main()