Skip to content

Commit

Permalink
Fix keyerror in cache autocleanup (#1674)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt committed Oct 3, 2024
1 parent 9ee1cd9 commit fc39481
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion music_assistant/server/controllers/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ async def auto_cleanup(self) -> None:
for db_row in await self.database.get_rows(DB_TABLE_CACHE):
# clean up db cache object only if expired
if db_row["expires"] < cur_timestamp:
await self.delete(db_row["id"])
await self.database.delete(DB_TABLE_CACHE, {"id": db_row["id"]})
cleaned_records += 1
await asyncio.sleep(0) # yield to eventloop
if cleaned_records > 50:
Expand Down

0 comments on commit fc39481

Please sign in to comment.