From cefdd2f66c635c19701aed27007a5650be2ed3a3 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Mon, 8 Feb 2021 20:39:03 +0100 Subject: [PATCH] suppress asyncio message always on restart or shutdown --- cps/server.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cps/server.py b/cps/server.py index 3148aed6..3787d2e9 100644 --- a/cps/server.py +++ b/cps/server.py @@ -251,10 +251,11 @@ class WebServer(object): finally: self.wsgiserver = None + # prevent irritiating log of pending tasks message from asyncio + logger.get('asyncio').setLevel(logger.logging.CRITICAL) + if not self.restart: log.info("Performing shutdown of Calibre-Web") - # prevent irritiating log of pending tasks message from asyncio - logger.get('asyncio').setLevel(logger.logging.CRITICAL) return True log.info("Performing restart of Calibre-Web")