diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/prolog_session.py | 7 | ||||
-rw-r--r-- | server/user_session.py | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/server/prolog_session.py b/server/prolog_session.py index 2c2d690..768f820 100644 --- a/server/prolog_session.py +++ b/server/prolog_session.py @@ -37,8 +37,7 @@ class PrologSession(object): No properties are accessible; use getters and setters instead. Values are passed by value instead of by reference (deep copy!). """ - def __init__(self, user_session): - self._user_session = user_session # the owning session + def __init__(self): self._access_lock = threading.Lock() self._engine_id = None self._problem_id = -1 @@ -120,5 +119,7 @@ class PrologSession(object): more_messages, status, have_more = self.query(query) messages.extend(more_messages) self._problem_id = problem_id -# self._user_session.update_solution(problem_id, [], program) # TODO return messages, status, have_more + + def get_problem_id(self): + return self._problem_id diff --git a/server/user_session.py b/server/user_session.py index d8cdf1d..d5aec44 100644 --- a/server/user_session.py +++ b/server/user_session.py @@ -50,7 +50,7 @@ class UserSession(object): def get_prolog(self): with self._access_lock: if self.prolog_session is None: - self.prolog_session = prolog_session.PrologSession(self) # lazy init + self.prolog_session = prolog_session.PrologSession() # lazy init return self.prolog_session def get_problem_data(self, language, problem_group, problem): |