From 5bf7f712f1848e98ff874e49528b6b048a53ca58 Mon Sep 17 00:00:00 2001 From: Andrei Neagu Date: Tue, 24 Oct 2023 15:14:06 +0200 Subject: [PATCH] using new API interface --- docker/kernel_checker.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docker/kernel_checker.py b/docker/kernel_checker.py index 1f324c2..0df4a9e 100644 --- a/docker/kernel_checker.py +++ b/docker/kernel_checker.py @@ -69,9 +69,7 @@ class MainHandler(tornado.web.RequestHandler): def get(self): idle_seconds = kernel_checker.get_idle_seconds() response = ( - {"is_inactive": True, "seconds_inactive" : idle_seconds} - if idle_seconds > 0 else - {"is_inactive": False, "seconds_inactive" : None} + {"seconds_inactive" : idle_seconds if idle_seconds > 0 else None} ) self.write(json.dumps(response))