RODY/app/services/RedisService.py
552068321@qq.com 6f7de660aa first commit
2022-11-04 17:37:08 +08:00

22 lines
500 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""
@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