python连接redis
import redis
r =redis.Redis(host='192.168.199.11',port = 6379 ,db = 0)
r.publish('chan_107','ni hao a ')
监听 :
redis-cli
SUBSCRIBE chan_107
python连接redis
import redis
r =redis.Redis(host='192.168.199.11',port = 6379 ,db = 0)
r.publish('chan_107','ni hao a ')
监听 :
redis-cli
SUBSCRIBE chan_107