From b7d01edd2cbb7b22e102df6e06d0cfac4bd06e82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=BA=E5=99=A8=E4=BA=BA=E6=80=BB=E5=8A=A8=E5=91=98?= <73592731+devourbots@users.noreply.github.com> Date: Wed, 5 May 2021 15:50:25 +0800 Subject: [PATCH] None --- test/rediswr.py => task.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename test/rediswr.py => task.py (95%) diff --git a/test/rediswr.py b/task.py similarity index 95% rename from test/rediswr.py rename to task.py index 3e91890..8d63ca9 100644 --- a/test/rediswr.py +++ b/task.py @@ -7,12 +7,12 @@ import imageio import telegram import time import os +import connector +from config import TOKEN -bot = telegram.Bot(token="1749418611:AAGOV2XB5mkMXqX-J_wtNu7KkrkhO_Xylmg") +bot = telegram.Bot(token=TOKEN) -pool = redis.ConnectionPool(host='127.0.0.1', port=6379, encoding='utf8', decode_responses=True) - -r = redis.StrictRedis(connection_pool=pool) +r = connector.get_connection() key_list = r.keys() group_list = []