diff --git a/daemons/bot.py b/daemons/bot.py index 27ae9ea..feb46c0 100644 --- a/daemons/bot.py +++ b/daemons/bot.py @@ -1,3 +1,4 @@ +import logging import os import telebot @@ -15,7 +16,7 @@ STAFF_CACHE = TTLCache(100, 60) def is_staff(telegram_id): - print('there') + logging.info("is staff check") staff_data = STAFF_CACHE.get(telegram_id) if staff_data is None: staff_data = get( @@ -26,8 +27,10 @@ def is_staff(telegram_id): } ) if staff_data.status_code != 200: + logging.info('return status ' + str(staff_data.status_code)) return False staff_data = staff_data.json()['is_staff'] + logging.info('got info ' + str(staff_data)) STAFF_CACHE[telegram_id] = staff_data return staff_data