diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-03-04 11:45:44 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-03-04 11:45:44 +0300 |
commit | c89fa05978217d8e46ef48c4089d6fade59eb16c (patch) | |
tree | 07e9fd526dbf9580f93483697f6713c865af21bf /app.py | |
parent | server.py: port number is a parameter (diff) | |
download | linux-status-c89fa05978217d8e46ef48c4089d6fade59eb16c.tar.gz linux-status-c89fa05978217d8e46ef48c4089d6fade59eb16c.zip |
get rid of the /timers endpoit, use /status
Diffstat (limited to 'app.py')
-rwxr-xr-x | app.py | 11 |
1 files changed, 0 insertions, 11 deletions
@@ -283,29 +283,21 @@ class UserInstanceStatusTaskList(Task): class StatusTask(Task): def __init__(self): self.hostname = hostname() - self.top = TopTask() self.system = SystemInstanceStatusTask() self.user = UserInstanceStatusTaskList() def run(self): - self.top.run() self.system.run() self.user.run() def result(self): return { 'hostname': self.hostname, - 'top': self.top.result(), 'system': self.system.result(), 'user': self.user.result(), } -class TimersTask(StatusTask): - # TODO: I'm going to remove the timers-only endpoint completely. - pass - - User = namedtuple('User', ['uid', 'name']) SystemdUser = namedtuple('SystemdUser', ['uid', 'name', 'runtime_dir']) @@ -396,7 +388,6 @@ def systemd_users(): class Request(Enum): STATUS = 'status' - TIMERS = 'timers' TOP = 'top' REBOOT = 'reboot' POWEROFF = 'poweroff' @@ -413,8 +404,6 @@ class Request(Enum): def process(self): if self is Request.STATUS: return StatusTask().complete() - if self is Request.TIMERS: - return TimersTask().complete() if self is Request.TOP: return TopTask().complete() if self is Request.REBOOT: |