feat(notifications): added notifications business logic

This commit is contained in:
ITQ
2026-02-23 10:57:03 +03:00
parent fd94994286
commit f3350ff81e
10 changed files with 926 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
import logging
from apps.notifications.services import flush_pending_notifications
from config.celery import app
logger = logging.getLogger("lotty")
@app.task(bind=True, name="notifications.flush_pending")
def flush_pending_notifications_task(self):
results = flush_pending_notifications()
logger.info(
"notifications_flush_completed",
extra={
"sent": results["sent"],
"failed": results["failed"],
},
)
return results