clean blobs after waiting interval instead of immediately on startup

This commit is contained in:
Lex Berezhny 2021-08-17 09:52:44 -04:00
parent bbf1ef0dc3
commit 4614c7d4c2

View file

@ -50,8 +50,8 @@ class DiskSpaceManager:
async def cleaning_loop(self): async def cleaning_loop(self):
while self.running: while self.running:
await asyncio.get_event_loop().run_in_executor(None, self.clean)
await asyncio.sleep(self.cleaning_interval) await asyncio.sleep(self.cleaning_interval)
await asyncio.get_event_loop().run_in_executor(None, self.clean)
async def start(self): async def start(self):
self.running = True self.running = True