diff options
author | Timotej Lazar <timotej.lazar@araneo.org> | 2015-09-01 16:13:33 +0200 |
---|---|---|
committer | Timotej Lazar <timotej.lazar@araneo.org> | 2015-09-01 16:13:33 +0200 |
commit | 9739e32cc0159f231698e4197a8d025185b28d7f (patch) | |
tree | 644c25777721fecc07f54d35ea0aea220dfb0dcd /server | |
parent | cf284202b76c94daa0425ac21e6f36182a375ffc (diff) |
Add Python support to wsgi_server.{Hint,Test}
Diffstat (limited to 'server')
-rw-r--r-- | server/__init__.py | 3 | ||||
-rw-r--r-- | server/user_session.py | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/server/__init__.py b/server/__init__.py index d71f707..284c162 100644 --- a/server/__init__.py +++ b/server/__init__.py @@ -30,9 +30,10 @@ class CodeqManager(multiprocessing.managers.BaseManager): pass class UserSessionProxy(multiprocessing.managers.BaseProxy): - _method_to_typeid_ = {'get_prolog':'PrologSession'} + _method_to_typeid_ = {'get_prolog': 'PrologSession', 'get_python': 'PythonSession'} CodeqManager.register('PrologSession') +CodeqManager.register('PythonSession') CodeqManager.register('UserSession', proxytype=UserSessionProxy) #CodeqManager.register('get_session_by_id', callable=user_session.get_session_by_id, proxytype=UserSessionProxy) #CodeqManager.register('get_or_create_session', callable=user_session.get_or_create_session, proxytype=UserSessionProxy) diff --git a/server/user_session.py b/server/user_session.py index 8b76e0a..920e195 100644 --- a/server/user_session.py +++ b/server/user_session.py @@ -42,7 +42,7 @@ class UserSession(object): self.prolog_session.end() self.prolog_session = None if self.python_session is not None: - self.python_session.end() + self.python_session.destroy() self.python_session = None # TODO: add any cleanups as features are added! |