mirror of
https://github.com/adulau/hashlookup-server.git
synced 2024-12-05 00:17:16 +00:00
chg: [api] expose the total keys of a hashlookup server
This commit is contained in:
parent
af5552ef75
commit
d8ac479d72
1 changed files with 3 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
version = "1.0"
|
||||
version = "1.1"
|
||||
from flask import Flask, url_for, send_from_directory, render_template, make_response, request
|
||||
from flask_restx import Resource, Api, reqparse
|
||||
import redis
|
||||
|
@ -263,7 +263,9 @@ class lookup(Resource):
|
|||
class info(Resource):
|
||||
def get(self):
|
||||
info = {}
|
||||
lookup = rdb.info()
|
||||
info['nsrl-version'] = rdb.get('nsrl-version')
|
||||
info['stat:hashlookup_total_keys'] = lookup['estimate_keys[default]']
|
||||
info['stat:nsrl_modern_rds'] = rdb.get('stat:nsrl_modern_rds')
|
||||
info['stat:nsrl_legacy'] = rdb.get('stat:nsrl_legacy')
|
||||
info['stat:nsrl_ios'] = rdb.get('stat:nsrl_ios')
|
||||
|
|
Loading…
Reference in a new issue