diff --git a/inventory_provider/tasks/worker.py b/inventory_provider/tasks/worker.py index e01e15f9c74a73110334590206e5936ba39d0a13..87b41bd4dfa5beec06229df55b4ca1f6177f5f10 100644 --- a/inventory_provider/tasks/worker.py +++ b/inventory_provider/tasks/worker.py @@ -142,7 +142,6 @@ def netconf_refresh_config(self, hostname): @app.task() def update_interfaces_to_services(): - # todo - factor this connection stuff out r = get_redis(InventoryTask.config) with db.connection(InventoryTask.config["ops-db"]) as cx: services = opsdb.get_circuits(cx) @@ -170,7 +169,6 @@ def update_interfaces_to_services(): @app.task() def update_equipment_locations(): - # todo - factor this connection stuff out r = get_redis(InventoryTask.config) r.delete(equipment_locations_key) @@ -182,7 +180,6 @@ def update_equipment_locations(): @app.task() def update_circuit_hierarchy(): - # todo - factor this connection stuff out r = get_redis(InventoryTask.config) children_to_parents = defaultdict(list) parents_to_children = defaultdict(list) @@ -206,7 +203,6 @@ def update_circuit_hierarchy(): @app.task() def update_interface_statuses(): - # todo - factor this connection stuff out r = get_redis(InventoryTask.config) with db.connection(InventoryTask.config["ops-db"]) as cx: services = opsdb.get_circuits(cx)