Open sajith opened 1 year ago
As Sajith mentioned in the above PR, we should refactor the DB class to make it more resilient and easier to use. Pasting the comments here:
read_from_db()
such that we can get what we need by simply calling read_from_db("latest_topo")
.db_instance.read_from_db("latest_topo")
returns None
, or if "latest_topo"
key does not exist in the dict returned.json.loads()
if topo_val
turns out to be None
.
I tried to do a
POST /connection
with a sample test request, without running the local controllers. It caused a crash. It must be that there's no "latest_topo" in the DB, but that should be normal and expected.