Skip to content
Snippets Groups Projects
Commit 77c8393c authored by Robert Latta's avatar Robert Latta
Browse files

Removed unnecessary function

parent ac9280dc
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
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