Skip to content

Commit a41e756

Browse files
fix: task name
1 parent 44d76ff commit a41e756

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

services/notifications/src/simcore_service_notifications/modules/celery/_email_tasks.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
_logger = logging.getLogger(__name__)
88

9+
EMAIL_CHANNEL_NAME = "email"
10+
911

1012
async 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)

services/notifications/src/simcore_service_notifications/modules/celery/tasks.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
from celery_library.types import register_celery_types, register_pydantic_types
77
from 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)

0 commit comments

Comments
 (0)