Celery-Progress-Bar 在 Django 中不起作用

我正在尝试使用 celery-progress 模块向用户显示任务的进度,因为完成任务需要很多时间。但是,按照https://github.com/czue/celery-progress上的说明进行操作后,我在前端看到以下错误:-


NoReverseMatch at /netadc/arista/views/getFabListArista/TRCW/

Reverse for 'task_status' with arguments '('',)' not found. 1 pattern(s) tried: [u'celery_progress/(?P<task_id>[\\w-]+)/$']

Request Method: GET

Request URL:    http://x.x.x.x/netadc/arista/views/getFabListArista/TRCW/

Django Version: 1.11

Exception Type: NoReverseMatch

Exception Value:


Reverse for 'task_status' with arguments '('',)' not found. 1 pattern(s) tried: [u'celery_progress/(?P<task_id>[\\w-]+)/$']


前端的 URL 模式var progressUrl = "{% url 'celery_progress:task_status' task_id %}";不起作用。当我将其更改为时,var progressUrl = "{% url 'celery_progress:task_status' 'task_id' %}";我没有收到错误消息,但没有任何任务正在运行。


任何有关 django/python 的专家,请帮忙。


慕沐林林
浏览 322回答 2
2回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Python