diff --git a/credentials.py b/credentials.py index 771a575..3bfa200 100644 --- a/credentials.py +++ b/credentials.py @@ -1,4 +1,3 @@ -token = '123456789:hciowedjejd092jjasdasdmdkpoaasd' -vk_app_id = "5678910" -bot_url = 'www.mybot.com' -local_port = 7777 \ No newline at end of file +import os +token = os.environ['TELEGRAM_TOKEN'] +vk_app_id = os.environ['VK_APP'] \ No newline at end of file diff --git a/vk_messages.py b/vk_messages.py index 8a4137a..363b0d8 100644 --- a/vk_messages.py +++ b/vk_messages.py @@ -2,12 +2,10 @@ import os import redis import requests import time -import traceback import vk import wget -tokens_pool = redis.ConnectionPool(host='localhost', port=6379, db=0) -vk_tokens = redis.StrictRedis(connection_pool=tokens_pool) +vk_tokens = redis.from_url(os.environ.get("REDIS_URL")) class VkPolling: