本文介绍了Django-Celery进度条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用:


  1. 芹菜

  2. Django-Celery

  3. RabbitMQ

我可以在Django管理页面中看到我的所有任务,但目前只有几个状态,如:

I can see all my tasks in the Django admin page, but at the moment it has just a few states, like:


  • RECEIVED

  • 重新

  • REVOKED

  • 成功

  • 已启动

  • 失败

  • PENDING

  • RECEIVED
  • RETRY
  • REVOKED
  • SUCCESS
  • STARTED
  • FAILURE
  • PENDING

这对我来说还不够。是否可以向管理页面添加有关正在运行的进程的更多详细信息?像进度栏完成作业计数器等。

It's not enough information for me. Is it possible to add more details about a running process to the admin page? Like progress bar or finished jobs counter etc.

我知道如何使用Celery日志功能,但是由于某些原因,GUI在我的情况下更好。

I know how to use the Celery logging function, but a GUI is better in my case for some reasons.

那么,是否可以将一些跟踪信息发送到Django-Celery管理页面?

So, is it possible to send some tracing information to the Django-Celery admin page?

推荐答案

我开始尝试弄清楚自己。首先按照中的说明定义一个PROGRESS状态那么你所需要的就是在你的模板中插入一个js来更新你的进度条。

I am starting to try figuring this out myself. Start by defining a PROGRESS state exactly as explained on the Celery userguide, then all you need is to insert a js in your template that will update your progress bar.

这篇关于Django-Celery进度条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-29 08:35