diff --git a/inventory_provider/tasks/worker.py b/inventory_provider/tasks/worker.py index 6b84324b25d6c7349830ca3cd866624a8df5ace6..2f48358a17bc2b5480ace087e8ab60391a4ea6af 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