时间:2021-07-01 10:21:17 帮助过:61人阅读
import redis
rdc = redis.StrictRedis()
pubsub = rdc.pubsub()
pubsub.psubscribe("__keyevent@0__:expired")
while pubsub.subscribed:
msg = pubsub.get_message()
if msg:
print msg