diff --git a/inventory_provider/routes/classifier.py b/inventory_provider/routes/classifier.py index a9e5e21173e2ff2d3351d8efcfb317626189c46c..177f9312dca50d89bd13d15cfb62659c1368c81a 100644 --- a/inventory_provider/routes/classifier.py +++ b/inventory_provider/routes/classifier.py @@ -244,10 +244,12 @@ def ix_peering_info(peer_info): r = common.get_current_redis() - for k in r.keys('ix_public_peer:*'): - other = r.get(k.decode('utf-8')).decode('utf-8') - other = json.loads(other) + for doc in common.load_json_docs( + config_params=current_app.config['INVENTORY_PROVIDER_CONFIG'], + key_pattern='ix_public_peer:*', + num_threads=10): + other = doc['value'] if other['router'] == peer_info['router']: result['router'].append(other['name'])