Skip to content
Snippets Groups Projects
Commit b39c80c2 authored by Release Webservice's avatar Release Webservice
Browse files

Finished release 0.24.

parents d5aa23ed b48f6892
No related branches found
No related tags found
No related merge requests found
......@@ -38,3 +38,4 @@
0.21: added parsing of 'logical-systems' (DBOARD3-150)
0.22: return a skeleton response for unknown interfaces (DBOARD3-169)
0.23: use redis pipelines where possible
0.24: optimization, don't do aggressive checking when deleting during rebuilding
......@@ -277,15 +277,18 @@ def _refresh_peers(hostname, key_base, peers):
logger.debug(
'removing cached %s for %r' % (key_base, hostname))
r = get_next_redis(InventoryTask.config)
for k in r.scan_iter(key_base + ':*'):
# potential race condition: another proc could have
# delete this element between the time we read the
# keys and the next statement ... check for None below
value = r.get(k.decode('utf-8'))
if value:
value = json.loads(value.decode('utf-8'))
if value['router'] == hostname:
r.delete(k)
# WARNING (optimization): this is an expensive query if
# the redis connection is slow, and we currently only
# call this method during a full refresh
# for k in r.scan_iter(key_base + ':*'):
# # potential race condition: another proc could have
# # delete this element between the time we read the
# # keys and the next statement ... check for None below
# value = r.get(k.decode('utf-8'))
# if value:
# value = json.loads(value.decode('utf-8'))
# if value['router'] == hostname:
# r.delete(k)
rp = r.pipeline()
for peer in peers:
......
......@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup(
name='inventory-provider',
version="0.23",
version="0.24",
author='GEANT',
author_email='swd@geant.org',
description='Dashboard inventory provider',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment