feat(harness): persist server sessions in postgres
This commit is contained in:
@@ -35,7 +35,13 @@ class SessionRepository(Protocol):
|
||||
|
||||
|
||||
def build_session_repository(config, principal: PrincipalContext, *, home=None) -> SessionRepository:
|
||||
"""Build the local adapter for Task 1; server selection arrives with Task 2."""
|
||||
"""Build the configured private session persistence adapter."""
|
||||
session_storage = getattr(config, "session_storage", None)
|
||||
if session_storage is not None:
|
||||
from tht.session.postgres_repository import PostgresSessionRepository
|
||||
|
||||
return PostgresSessionRepository.from_config(session_storage.connection, principal)
|
||||
|
||||
from tht.config import local_tht_home
|
||||
from tht.session.filesystem_repository import FilesystemSessionRepository
|
||||
|
||||
|
||||
Reference in New Issue
Block a user