AnnouncerInfo API command for tracker status

This commit is contained in:
shortcutme 2018-04-28 22:00:15 +02:00
parent 8e93470b94
commit 0e84bf95da
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
1 changed files with 8 additions and 0 deletions

View File

@ -334,6 +334,9 @@ class UiWebsocket(object):
"plugins": PluginManager.plugin_manager.plugin_names
}
def formatAnnouncerInfo(self, site):
return {"address": site.address, "stats": site.announcer.stats}
# - Actions -
def actionAs(self, to, address, cmd, params=[]):
@ -379,6 +382,11 @@ class UiWebsocket(object):
ret = self.formatServerInfo()
self.response(to, ret)
def actionAnnouncerInfo(self, to):
ret = self.formatAnnouncerInfo(self.site)
self.response(to, ret)
# Sign content.json
def actionSiteSign(self, to, privatekey=None, inner_path="content.json", remove_missing_optional=False, update_changed_files=False, response_ok=True):
self.log.debug("Signing: %s" % inner_path)