#NEWLINE# @ tornado . gen . coroutine #NEWLINE# def ping_redis( num ) : #NEWLINE# #INDENT# with ( yield pool . connected_client ( ) ) as client : #NEWLINE# #INDENT# if ( not isinstance ( num , tornadis . TornadisException ) ) : #NEWLINE# #INDENT# reply = ( yield client . call ( 'PING' ) ) #NEWLINE# if ( not isinstance ( reply , tornadis . TornadisException ) ) : #NEWLINE# #INDENT# print ( ( 'reply #%i : %s' % ( num , reply ) ) )