##// END OF EJS Templates
utils: added get_es_info function
ergo -
Show More
@@ -546,3 +546,13 b' def in_batches(seq, size):'
546 :param size integer
546 :param size integer
547 """
547 """
548 return (seq[pos : pos + size] for pos in range(0, len(seq), size))
548 return (seq[pos : pos + size] for pos in range(0, len(seq), size))
549
550
551 def get_es_info(cache_regions, es_conn):
552 @cache_regions.memory_min_10.cache_on_arguments()
553 def get_es_info_cached():
554 returned_info = {"raw_info": es_conn.info()}
555 returned_info["version"] = returned_info["raw_info"]["version"]["number"].split('.')
556 return returned_info
557
558 return get_es_info_cached()
General Comments 0
You need to be logged in to leave comments. Login now