mirror of
https://github.com/adulau/pdns-qof-server.git
synced 2024-11-22 01:57:07 +00:00
Less redis queries a bit more memory usage
This commit is contained in:
parent
a9b8d0e9f4
commit
a7e3cdc77c
1 changed files with 3 additions and 2 deletions
|
@ -60,9 +60,10 @@ def getRecord(t = None):
|
||||||
for rr in rrset:
|
for rr in rrset:
|
||||||
if (rr['Value']) is not None and rr['Value'] in rrset_supported:
|
if (rr['Value']) is not None and rr['Value'] in rrset_supported:
|
||||||
rec = "r:"+t+":"+rr['Value']
|
rec = "r:"+t+":"+rr['Value']
|
||||||
if r.smembers(rec):
|
rs = r.smembers(rec)
|
||||||
|
if rs:
|
||||||
rrval = {}
|
rrval = {}
|
||||||
for v in r.smembers(rec):
|
for v in rs:
|
||||||
rdata = v.decode(encoding='UTF-8').strip()
|
rdata = v.decode(encoding='UTF-8').strip()
|
||||||
rrval['time_first'] = getFirstSeen(t1=t, t2=rdata)
|
rrval['time_first'] = getFirstSeen(t1=t, t2=rdata)
|
||||||
rrval['time_last'] = getLastSeen(t1=t, t2=rdata)
|
rrval['time_last'] = getLastSeen(t1=t, t2=rdata)
|
||||||
|
|
Loading…
Reference in a new issue