My code:

import redis
client = redis.Redis()
while True:
    data = client.blpop('key', timeout=5 * 60)
    if not data:
        continue
    parse(data[1])

sometime, this code will block forever even if there are many datas in the list. Especially when the list is empty for a long time, and then I lpush some data to it, the code could not read data from list, just blocks here. I must restart the program, then it could continue to consume.

Comment From: malthejorgensen

@kingname Do you remember why you closed this?