update_manager: Prune stale data in the database
SIgned-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
3203950ca9
commit
e8c1798a13
|
@ -128,6 +128,14 @@ class UpdateManager:
|
||||||
raise config.error(
|
raise config.error(
|
||||||
f"Invalid type '{client_type}' for section [{section}]")
|
f"Invalid type '{client_type}' for section [{section}]")
|
||||||
|
|
||||||
|
# Prune stale data from the database
|
||||||
|
umdb = self.cmd_helper.get_umdb()
|
||||||
|
db_keys = umdb.keys()
|
||||||
|
for key in db_keys:
|
||||||
|
if key not in self.updaters:
|
||||||
|
logging.info(f"Removing stale update_manager data: {key}")
|
||||||
|
umdb.pop(key, None)
|
||||||
|
|
||||||
self.cmd_request_lock = asyncio.Lock()
|
self.cmd_request_lock = asyncio.Lock()
|
||||||
self.klippy_identified_evt: Optional[asyncio.Event] = None
|
self.klippy_identified_evt: Optional[asyncio.Event] = None
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue