Switch to celery.shared_task (#4881)

* Switch to celery.shared_task

* Sort impots

---------

Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
This commit is contained in:
Matthew Foster Walsh 2024-02-21 16:07:25 -05:00 committed by GitHub
parent 70cde064d4
commit a247d8f8a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,8 +1,9 @@
from config import celery_app
from celery import shared_task
from {{ cookiecutter.project_slug }}.users.models import User
@celery_app.task()
@shared_task()
def get_users_count():
"""A pointless Celery task to demonstrate usage."""
return User.objects.count()