Fix shutdown timeouts (#695)

Co-authored-by: AAGaming <aagaming@riseup.net>
This commit is contained in:
Sims
2024-09-01 20:15:49 +02:00
committed by GitHub
parent 4842a599e0
commit 016ed6e998
9 changed files with 70 additions and 44 deletions
+6 -1
View File
@@ -104,10 +104,15 @@ class Loader:
async def enable_reload_wait(self):
if self.live_reload:
await sleep(10)
if self.watcher:
if self.watcher and self.live_reload:
self.logger.info("Hot reload enabled")
self.watcher.disabled = False
async def disable_reload(self):
if self.watcher:
self.watcher.disabled = True
self.live_reload = False
async def handle_frontend_assets(self, request: web.Request):
file = Path(__file__).parent.joinpath("static").joinpath(request.match_info["path"])
return web.FileResponse(file, headers={"Cache-Control": "no-cache"})