RODY/app/services/RedisService.py

22 lines
500 B
Python
Raw Permalink Normal View History

2022-11-04 17:37:08 +08:00
"""
@Time 2022/10/9 11:53
@Auth
@File RedisService.py
@IDE PyCharm
@MottoABC(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