Skip to content

Commit

Permalink
using new API interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei Neagu committed Oct 24, 2023
1 parent be8989e commit 5bf7f71
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions docker/kernel_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit 5bf7f71

Please sign in to comment.