From 77c8393c55696a8f026c67b8a532b04085602421 Mon Sep 17 00:00:00 2001 From: Robert Latta <robert.latta@geant.org> Date: Wed, 23 Jan 2019 14:28:18 +0000 Subject: [PATCH] Removed unnecessary function --- inventory_provider/tasks/worker.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/inventory_provider/tasks/worker.py b/inventory_provider/tasks/worker.py index 6b84324b..2f48358a 100644 --- a/inventory_provider/tasks/worker.py +++ b/inventory_provider/tasks/worker.py @@ -83,7 +83,6 @@ class WorkerArgs(bootsteps.Step): InventoryTask.logger = logging.getLogger(constants.TASK_LOGGER_NAME) -monitored_services_key = "monitored_services" interfaces_key = "interface_services" equipment_locations_key = "equipment_locations" service_child_to_parents_key = "child_to_parent_circuit_relations" @@ -147,22 +146,6 @@ def update_alarmsdb_cache(self): logger.debug('FINISHED: update_alarmsdb_cache') -@app.task() -def update_service_to_monitor(): - # todo - factor this connection stuff out - r = redis.StrictRedis( - host=InventoryTask.config["redis"]["hostname"], - port=InventoryTask.config["redis"]["port"]) - r.delete(monitored_services_key) - - relevant_types = ("path", "service", "l2circuit") - with db.connection(InventoryTask.config["ops-db"]) as cx: - for circuit in opsdb.get_circuits(cx): - if circuit["circuit_type"].lower() in relevant_types: - r.hset( - monitored_services_key, circuit["id"], json.dumps(circuit)) - - @app.task() def update_interfaces_to_services(): # todo - factor this connection stuff out -- GitLab