aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/app.py
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-03-04 11:45:44 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-03-04 11:45:44 +0300
commitc89fa05978217d8e46ef48c4089d6fade59eb16c (patch)
tree07e9fd526dbf9580f93483697f6713c865af21bf /app.py
parentserver.py: port number is a parameter (diff)
downloadlinux-status-c89fa05978217d8e46ef48c4089d6fade59eb16c.tar.gz
linux-status-c89fa05978217d8e46ef48c4089d6fade59eb16c.zip
get rid of the /timers endpoit, use /status
Diffstat (limited to 'app.py')
-rwxr-xr-xapp.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/app.py b/app.py
index 96ffc1d..a224b0b 100755
--- a/app.py
+++ b/app.py
@@ -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: