Corp/backend/tasks/tasks.py

23 lines
670 B
Python

from celery import shared_task
from tasks.automation import (
dispatch_scheduled_automations,
process_activity_automations,
)
from tasks.notifications.handlers import dispatch_task_due_notifications
@shared_task(name="tasks.dispatch_task_due_notifications")
def dispatch_task_due_notifications_task():
return dispatch_task_due_notifications()
@shared_task(name="tasks.process_task_automation_event")
def process_task_automation_event_task(activity_id):
return process_activity_automations(activity_id)
@shared_task(name="tasks.dispatch_scheduled_automations")
def dispatch_scheduled_automations_task():
return dispatch_scheduled_automations()