flower插件-监视celery

发布时间 2023-10-04 12:11:39作者: 蕝戀

安装和使用:

https://flower.readthedocs.io/en/latest/install.html#installation

https://github.com/mher/flower/tree/master/examples

celery相关配置:

# 发送与任务相关的事件,以便可以使用flower之类的工具来监控任务
# 或者在启动worker服务时,使用-E参数。
worker_send_task_events = True

# 如果启用,将为每个任务发送一个 task-sent 事件,以便可以在任务被工作人员使用之前对其进行跟踪。
task_send_sent_event = True

启动:

# 默认web端口为5555,监听地址是0.0.0.0
celery -A celeary-app实例所在模块 flower