Fix WSGI config reload
This commit is contained in:
parent
84ccc2bd84
commit
f4efe179e4
@ -26,7 +26,7 @@ class VMMgr:
|
|||||||
self.conf.save()
|
self.conf.save()
|
||||||
# Attempt to contact running vmmgr WSGI application to reload config
|
# Attempt to contact running vmmgr WSGI application to reload config
|
||||||
try:
|
try:
|
||||||
requests.get('https://127.0.0.1/reload-config', timeout=3)
|
requests.get('http://127.0.0.1:8080/reload-config', timeout=3)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ class WSGIApp:
|
|||||||
Rule('/login', methods=['GET'], endpoint='login_view'),
|
Rule('/login', methods=['GET'], endpoint='login_view'),
|
||||||
Rule('/login', methods=['POST'], endpoint='login_action'),
|
Rule('/login', methods=['POST'], endpoint='login_action'),
|
||||||
Rule('/setup-host', redirect_to='/login?redir=setup-host'),
|
Rule('/setup-host', redirect_to='/login?redir=setup-host'),
|
||||||
Rule('/setup-apps', redirect_to='/login?redir=setup-apps')
|
Rule('/setup-apps', redirect_to='/login?redir=setup-apps'),
|
||||||
))
|
))
|
||||||
self.admin_url_map = Map((
|
self.admin_url_map = Map((
|
||||||
Rule('/', endpoint='portal_view'),
|
Rule('/', endpoint='portal_view'),
|
||||||
@ -60,10 +60,10 @@ class WSGIApp:
|
|||||||
Rule('/uninstall-app', endpoint='uninstall_app_action'),
|
Rule('/uninstall-app', endpoint='uninstall_app_action'),
|
||||||
Rule('/update-password', endpoint='update_password_action'),
|
Rule('/update-password', endpoint='update_password_action'),
|
||||||
Rule('/shutdown-vm', endpoint='shutdown_vm_action'),
|
Rule('/shutdown-vm', endpoint='shutdown_vm_action'),
|
||||||
Rule('/reboot-vm', endpoint='reboot_vm_action')
|
Rule('/reboot-vm', endpoint='reboot_vm_action'),
|
||||||
))
|
))
|
||||||
self.localhost_url_map = Map((
|
self.localhost_url_map = Map((
|
||||||
Rule('/reload-config', endpoint='reload_config_action')
|
Rule('/reload-config', endpoint='reload_config_action'),
|
||||||
))
|
))
|
||||||
|
|
||||||
def __call__(self, environ, start_response):
|
def __call__(self, environ, start_response):
|
||||||
@ -396,7 +396,7 @@ class WSGIApp:
|
|||||||
|
|
||||||
def reload_config_action(self, request):
|
def reload_config_action(self, request):
|
||||||
# Reload configuration (called by vmmgr.register_app())
|
# Reload configuration (called by vmmgr.register_app())
|
||||||
self.config.load()
|
self.conf.load()
|
||||||
return Response(status=204)
|
return Response(status=204)
|
||||||
|
|
||||||
def is_app_visible(self, app):
|
def is_app_visible(self, app):
|
||||||
|
Loading…
Reference in New Issue
Block a user