remove Hub, Proxy from database

These are in-memory-only objects, no need for a table with one row
This commit is contained in:
Min RK
2017-04-20 15:18:30 +02:00
parent a98bab8b5e
commit acc31b8441
15 changed files with 178 additions and 327 deletions

View File

@@ -37,7 +37,7 @@ class RootHandler(BaseHandler):
# The next request will be handled by UserSpawnHandler,
# ultimately redirecting to the logged-in user's server.
without_prefix = next_url[len(self.base_url):]
next_url = url_path_join(self.hub.server.base_url, without_prefix)
next_url = url_path_join(self.hub.base_url, without_prefix)
self.log.warning("Redirecting %s to %s. For sharing public links, use /user-redirect/",
self.request.uri, next_url,
)
@@ -50,7 +50,7 @@ class RootHandler(BaseHandler):
self.log.debug("User is running: %s", url)
self.set_login_cookie(user) # set cookie
else:
url = url_path_join(self.hub.server.base_url, 'home')
url = url_path_join(self.hub.base_url, 'home')
self.log.debug("User is not running: %s", url)
else:
url = self.settings['login_url']
@@ -215,7 +215,7 @@ class ProxyErrorHandler(BaseHandler):
status_message = responses.get(status_code, 'Unknown HTTP Error')
# build template namespace
hub_home = url_path_join(self.hub.server.base_url, 'home')
hub_home = url_path_join(self.hub.base_url, 'home')
message_html = ''
if status_code == 503:
message_html = ' '.join([