Remove unused utility files and update requirements.txt to include new dependencies for data processing and database interaction.
18 lines
791 B
Python
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
|