Bring the application, own tests, Dockerfile, toolchain, compose stack, HAProxy, k6, RustFS and RabbitMQ configuration, migrations, hooks, scenario scripts and the CI job from the lab 5 solution commit 64d5c67, keep the lab 5 Makefile targets on top of the unchanged skeleton targets, and append the lab 5 solution variables to the skeleton .env.example. The package and the application follow the contract version 1.6.0, and the image, the throwaway test containers and the broker vhost description are tagged lab6 so they do not collide with a lab 5 stand on the same host. This is the starting point of the lab 6 cycle: lint, own tests and the offline skeleton check pass before any lab 6 change. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
21 lines
765 B
Python
21 lines
765 B
Python
from messenger.identity.domain.events import SessionClosed, SessionOpened, UserRegistered
|
|
from messenger.shared.application.ports import Logger
|
|
|
|
LOG_FIELDS = frozenset({"actor_id"})
|
|
|
|
|
|
class IdentityJournal:
|
|
__slots__ = ("_logger",)
|
|
|
|
def __init__(self, logger: Logger) -> None:
|
|
self._logger = logger
|
|
|
|
async def on_user_registered(self, event: UserRegistered) -> None:
|
|
self._logger.info("audit.user_registered", actor_id=str(event.user_id))
|
|
|
|
async def on_session_opened(self, event: SessionOpened) -> None:
|
|
self._logger.info("audit.session_opened", actor_id=str(event.user_id))
|
|
|
|
async def on_session_closed(self, event: SessionClosed) -> None:
|
|
self._logger.info("audit.session_closed", actor_id=str(event.user_id))
|