""" @Time : 2022/10/9 11:53 @Auth : 东 @File :RedisService.py @IDE :PyCharm @Motto:ABC(Always Be Coding) @Desc: """ # coding:utf-8 import json import time import redis number_list = ['300033', '300032', '300031', '300030'] signal = ['1', '-1', '1', '-1'] # rc = redis.StrictRedis(host='127.0.0.1', port='6379', db=3, password='sdust2020') # for i in range(len(number_list)): # value_new = {"ceshi": "测试"} # rc.publish("liao", json.dumps(value_new)) # 发布消息到liao