mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-09 14:34:53 +03:00
Switch to celery.shared_task
This commit is contained in:
parent
8c60674654
commit
33458239b2
|
@ -1,11 +1,10 @@
|
|||
from celery import shared_task
|
||||
from django.contrib.auth import get_user_model
|
||||
|
||||
from config import celery_app
|
||||
|
||||
User = get_user_model()
|
||||
|
||||
|
||||
@celery_app.task()
|
||||
@shared_task()
|
||||
def get_users_count():
|
||||
"""A pointless Celery task to demonstrate usage."""
|
||||
return User.objects.count()
|
||||
|
|
Loading…
Reference in New Issue
Block a user