如何使用 Ajax 检查 django-celery 任务的状态和结果?

发布于 2024-11-27 23:49:13 字数 157 浏览 4 评论 0原文

Django Celery 文档 建议我可以检查一些 URL 以获取任务的状态。这些 URL 是什么?

The Django Celery documentation suggests there are URLs I can check to get the status of a task. What are these URLs?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

旧夏天 2024-12-04 23:49:13

要访问这些 URL,您需要将它们包含在 urls.py 文件之一中。例如:

urlpatterns = patterns('',
    url('^tasks/', include('djcelery.urls')),
)

然后您可以使用 http://example.com/tasks/{{ task_id }}/status/ 来访问它们。

To access these URLs, you need to include them from one of your urls.py files. For example:

urlpatterns = patterns('',
    url('^tasks/', include('djcelery.urls')),
)

You would then access them using, for example, http://example.com/tasks/{{ task_id }}/status/.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文