Files
sientia-dataops-laborious-l…/laborious/activities/base.py
vitor-aignosi e7f214b144 SIENTIAPDE-994
Remove unused utility files and update requirements.txt to include new dependencies for data processing and database interaction.
2025-05-07 17:39:45 -03:00

18 lines
791 B
Python

from temporalio import activity
from sientia_do.notifications.handlers import NotificationHandler
from logging import Logger
class BaseActivity:
def __init__(self, logger: Logger, notification_handler: NotificationHandler):
self.logger = logger
self.notification_handler = notification_handler
@activity.defn(name="prepare_notification_handler")
async def prepare_notification_handler(self, schedule_name: str,
model_name: str,
model_id: str):
self.notification_handler.base_notification.schedule_name = schedule_name
self.notification_handler.base_notification.model_name = model_name
self.notification_handler.base_notification.model_id = model_id