File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
services/notifications/src/simcore_service_notifications/modules/celery Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 66
77_logger = logging .getLogger (__name__ )
88
9+ EMAIL_CHANNEL_NAME = "email"
10+
911
1012async def send_email (
1113 task : Task ,
@@ -14,4 +16,4 @@ async def send_email(
1416) -> None :
1517 # TODO: render email template with message and recipient details
1618 # and send the email using an email service
17- _logger .info (f "Sending email notification to { recipient .address } " )
19+ _logger .info ("Sending email notification to %s" , recipient .address )
Original file line number Diff line number Diff line change 66from celery_library .types import register_celery_types , register_pydantic_types
77from servicelib .logging_utils import log_context
88
9- from ...models .schemas import NotificationMessage , SMSRecipient
10- from ...modules .celery ._email_tasks import EmailRecipient , send_email
9+ from ...models .schemas import EmailRecipient , NotificationMessage , SMSRecipient
10+ from ...modules .celery ._email_tasks import EMAIL_CHANNEL_NAME , send_email
1111
1212_logger = logging .getLogger (__name__ )
1313
@@ -24,4 +24,4 @@ def setup_worker_tasks(app: Celery) -> None:
2424 register_pydantic_types (NotificationMessage , EmailRecipient , SMSRecipient )
2525
2626 with log_context (_logger , logging .INFO , msg = "worker tasks registration" ):
27- register_task (app , send_email )
27+ register_task (app , send_email , EMAIL_CHANNEL_NAME )
You can’t perform that action at this time.
0 commit comments