Switch to celery.shared_task

This commit is contained in:
Matthew Foster Walsh 2024-02-20 16:22:10 -05:00
parent 8c60674654
commit 33458239b2
No known key found for this signature in database

View File

@ -1,11 +1,10 @@
from celery import shared_task
from django.contrib.auth import get_user_model from django.contrib.auth import get_user_model
from config import celery_app
User = get_user_model() User = get_user_model()
@celery_app.task() @shared_task()
def get_users_count(): def get_users_count():
"""A pointless Celery task to demonstrate usage.""" """A pointless Celery task to demonstrate usage."""
return User.objects.count() return User.objects.count()