feat: add email code log

This commit is contained in:
2026-04-13 13:35:32 +03:00
parent 949b57e425
commit f92eadf8fa
2 changed files with 2 additions and 6 deletions

View File

@@ -102,8 +102,6 @@ class UserLoginStartCommand:
'metadata': metadata, 'metadata': metadata,
} }
self._logger.info(f'payload: {payload})')
try: try:
await self._messanger.publish_to_queue( await self._messanger.publish_to_queue(
queue=settings.RABBIT_EMAIL_CODE_QUEUE, queue=settings.RABBIT_EMAIL_CODE_QUEUE,
@@ -123,7 +121,7 @@ class UserLoginStartCommand:
self._logger.error(f'Failed to publish login email event for {email}: {str(exception)}') self._logger.error(f'Failed to publish login email event for {email}: {str(exception)}')
raise ApplicationException(503, 'Temporary error. Please try again.') raise ApplicationException(503, 'Temporary error. Please try again.')
self._logger.info(f'login code created for {email}') self._logger.info(f'Login email verification code queued email={email} code={code}')
return True return True
self._logger.error(f'login start failed: code space exhausted for {email}') self._logger.error(f'login start failed: code space exhausted for {email}')

View File

@@ -102,8 +102,6 @@ class UserRegistrationStartCommand:
'metadata': metadata, 'metadata': metadata,
} }
self._logger.info(f'payload: {payload})')
try: try:
await self._messanger.publish_to_queue( await self._messanger.publish_to_queue(
queue=settings.RABBIT_EMAIL_CODE_QUEUE, queue=settings.RABBIT_EMAIL_CODE_QUEUE,
@@ -123,7 +121,7 @@ class UserRegistrationStartCommand:
self._logger.error(f'Failed to publish registration email event for {email}: {str(exception)}') self._logger.error(f'Failed to publish registration email event for {email}: {str(exception)}')
raise ApplicationException(503, 'Temporary error. Please try again.') raise ApplicationException(503, 'Temporary error. Please try again.')
self._logger.info(f'Registration code created for {email}') self._logger.info(f'Registration email verification code queued email={email} code={code}')
return True return True
self._logger.error(f'Registration start failed: code space exhausted for {email}') self._logger.error(f'Registration start failed: code space exhausted for {email}')