#NEWLINE# def coordinator_setup( ) : #NEWLINE# #INDENT# '\n    Sets up the client for the coordination service.\n\n    URL examples for connection:\n        zake://\n        file:///tmp\n        redis://username:password@host:port\n        mysql://username:password@host:port/dbname\n    ' #NEWLINE# url = cfg . CONF . coordination . url #NEWLINE# lock_timeout = cfg . CONF . coordination . lock_timeout #NEWLINE# proc_info = system_info . get_process_info ( ) #NEWLINE# member_id = ( '%s_%d' % ( proc_info [ 'hostname' ] , proc_info [ 'pid' ] ) ) #NEWLINE# if url : #NEWLINE# #INDENT# coordinator = coordination . get_coordinator ( url , member_id , lock_timeout = lock_timeout ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# coordinator = NoOpDriver ( ) #NEWLINE# #UNINDENT# coordinator . start ( ) #NEWLINE# return coordinator