Redis connection fix
This commit is contained in:
parent
17df7c24be
commit
879db37f5f
3
bot.py
3
bot.py
@ -23,7 +23,8 @@ vk_dialogs = {}
|
|||||||
|
|
||||||
FILE_URL = 'https://api.telegram.org/file/bot{0}/{1}'
|
FILE_URL = 'https://api.telegram.org/file/bot{0}/{1}'
|
||||||
|
|
||||||
vk_tokens = redis.from_url(os.environ.get("REDIS_URL"))
|
tokens_pool = redis.ConnectionPool(host='localhost', port=6379, db=0)
|
||||||
|
vk_tokens = redis.StrictRedis(connection_pool=tokens_pool)
|
||||||
|
|
||||||
currentchat = {}
|
currentchat = {}
|
||||||
|
|
||||||
|
@ -6,7 +6,8 @@ import traceback
|
|||||||
import vk
|
import vk
|
||||||
import wget
|
import wget
|
||||||
|
|
||||||
vk_tokens = redis.from_url(os.environ.get("REDIS_URL"))
|
tokens_pool = redis.ConnectionPool(host='localhost', port=6379, db=0)
|
||||||
|
vk_tokens = redis.StrictRedis(connection_pool=tokens_pool)
|
||||||
|
|
||||||
|
|
||||||
class VkPolling:
|
class VkPolling:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user