芹菜任务突然缺少
我有一个长期运行的芹菜任务,在执行开始时可以在花朵中看到它,但是几个小时后,它就不存在了!我在任务详细信息页面中看到的只是未知任务'894A8B45-5963-40DA-A104-7FFFFFFFF98BC267'
,我找不到Redis中的键,但是我可以告诉任务仍然通过查看logs来运行。任务不会失败,它只是消失了!
I have a long running celery task which I can see it in flower at the beginning of execution but after some hours, it's like it doesn't exist! All I see in task details page is Unknown task '894a8b45-5963-40da-a104-7ffff98bc267'
and I cannot find that key in Redis but I can tell the task is still running by looking at logs. The task does not fail, it just disappears!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Flower可以在内存中保持任务的信息。它与您的芹菜后端无关(例如Redis)。
默认情况下,它将保留最后10,000个任务,因此,如果您的系统运行许多任务,那么您的任务会变老并被清除以使更新任务的位置。
假设就是这样 - 您将看到
未知任务
消息。您可以通过“ nofollow noreferrer”> max-tasks < /a>。
flower keeps task's information in-memory. It is not related to your celery backend (Redis for example).
By default it keeps the last 10,000 tasks so if your system run many tasks it make sense that your task becomes older and being purged to make place for a newer tasks.
Assuming that's the case - you'll see the
Unknown task
message.You can tune the number of tasks to keep in memory with max-tasks.