Closed shifenhutu closed 3 weeks ago
Hi.
I would like to hear a more detailed use case.
@TGoddessana
i am sorry for my bad english
i haven't already implemented that
i used chrome F12 to make this UI
in https://github.com/celery/django-celery-results , it will save the result to django-db,
# app/tasks.py
from celery import shared_task
import time
@shared_task
def add(x, y):
time.sleep(2)
return x + y # [django-celery-results] will be save result to django db
# app/views.py
from .tasks import add
def test_celery(request):
add.delay(3, 5)
return HttpResponse("Celery works")
# app/urls.py
urlpatterns = [
re_path(r'^test/$', views.test_celery, name="test_celery")
]
thank you very much
i find https://github.com/django-q2/django-q2 it can save the result to django db
@shifenhutu
Sorry for the delay. I'm glad that you found a nice solution for your project.
As you said, a new migration file is required to add the new fields to the database. This can be a load under a system that already has tons of rows (of course, I believe it's the role of the owner of that Django project to review and apply new migrations, not the role of the maintainer of django-apscheduler 😅).
But I think this feature is quite useful and nice, maybe we can implement it in the project? @jcass77 would love to hear your thoughts 😀
Describe the bug / feature in my task, i return a data , i hope save the data to django
my hope
when i in my task return a data
i hope i can see the data in [Django job executions]
thank you very much