test celery

This commit is contained in:
Ross
2025-02-24 16:57:37 +00:00
parent c1f5147af7
commit f43c54f4af
8 changed files with 44 additions and 2 deletions
+13
View File
@@ -0,0 +1,13 @@
from time import sleep
from django.core.mail import send_mail
from celery import shared_task
@shared_task()
def long():
"""Sends an email when the feedback form has been submitted."""
for i in range(20):
sleep(1) # Simulate expensive operation(s) that freeze Django
print(i)
return 10