redis brpop停止处理queu

2024-05-16 14:25:06 发布

您现在位置:Python中文网/ 问答频道 /正文

我在brpop命令中选择redis作为队列。python脚本如下:

while True:
    try:
        task = rdb.brpop("msg:queue")
        print(task)

    except Exception:
        print("error")

另一个应用程序将通过lpush将一些消息推送到msg:queue。我选择supvervisor来运行脚本。当脚本运行几天时。在

脚本仍在运行,应用程序仍将消息推送到队列,但是,brpop不起作用,它停止处理队列。在

这个问题看起来是:blpop stops processing queue after a while。但我没有什么功能。在

可能是redis的问题,还是我用redis来排队?在


Tags: 命令脚本redistrue应用程序消息task队列