From aa58ad81526128b8f12169c271799f810e79123f Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Sun, 5 Sep 2021 21:59:20 +0200 Subject: [PATCH] chg: [stats/top] remove recently added hashes from previously nx hash --- bin/server.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/server.py b/bin/server.py index e1e1c9a..c470c52 100644 --- a/bin/server.py +++ b/bin/server.py @@ -287,6 +287,9 @@ class stattop(Resource): return {'message': 'Public statistics not enabled'}, 400 ret = {} ret['nx'] = rdb.zrevrange("s:nx:sha1", 0, 100, withscores=True) + for val in ret['nx']: + if rdb.exists("h:".format(val)): + ret['nx'].remove(val) exist = rdb.zrevrange("s:exist:sha1", 0, 100, withscores=True) ret['exist'] = [] for value in exist: