feat(notifications): add redis-backed sse notification streaming
This commit is contained in:
11
apps/notifications/tasks.py
Normal file
11
apps/notifications/tasks.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from celery import shared_task
|
||||
from django.conf import settings
|
||||
|
||||
from apps.notifications.services import RedisNotificationStore
|
||||
|
||||
|
||||
@shared_task(name="notifications.cleanup_redis_notifications")
|
||||
def cleanup_redis_notifications():
|
||||
return RedisNotificationStore.cleanup_expired(
|
||||
retention_days=settings.NOTIFICATION_RETENTION_DAYS
|
||||
)
|
||||
Reference in New Issue
Block a user