Skip to content

Commit

Permalink
Improved namespace redis
Browse files Browse the repository at this point in the history
  • Loading branch information
anders-kiaer committed Oct 10, 2023
1 parent b59b5a8 commit e1cf482
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/src/backend/primary/user_session_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ def __init__(self, name: str, port: int) -> None:
self._redis_client = redis.Redis(host="redis-user-session", port=6379, decode_responses=True)

def _get_job_name(self, user_id: str) -> Optional[str]:
return self._redis_client.get("user-session-" + user_id)
return self._redis_client.get("user-job-name-" + user_id)

def _set_job_name(self, user_id: str, job_name: str) -> None:
self._redis_client.set("user-session-" + user_id, job_name)
self._redis_client.set("user-job-name-" + user_id, job_name)

async def _active_running_job(self, user_id: str) -> bool:
"""Returns true if there already is a running job for logged in user."""
Expand Down

0 comments on commit e1cf482

Please sign in to comment.