def get_continuous_query(database, name, **client_args):
 client = _client(**client_args)
 try:
  for (db, cqs) in client.query('SHOW CONTINUOUS QUERIES').items():
   if (db[0] == database):
    return next((cq for cq in cqs if (cq.get('name') == name)))
 except StopIteration:
  return {}
 return {}

def get_continuous_query ( database , name , ** client_args ) : client = _client ( ** client_args ) try : for ( db , cqs ) in client . query ( 'SHOW CONTINUOUS QUERIES' ) . items ( ) : if ( db [ 0 ] == database ) : return next ( ( cq for cq in cqs if ( cq . get ( 'name' ) == name ) ) ) except StopIteration : return { } return { }
get an existing continuous query .