polling-log2

This commit is contained in:
2024-09-26 14:13:33 +03:00
parent fb977fe529
commit ff57e35f53
2 changed files with 5 additions and 5 deletions

View File

@@ -18,12 +18,12 @@ async def telegram_api(endpoint: str, json_data=None, **kwargs):
headers = {'Content-Type': 'application/json'}
async with aiohttp.ClientSession() as session:
url = api_base + f"{endpoint}?{urlencode(kwargs)}"
if not is_polling:
logger.info(f' >>> {url} {json_data if json_data else ""}')
#if not is_polling:
logger.info(f' >>> {url} {json_data if json_data else ""}')
async with session.get(url, data=json.dumps(json_data), headers=headers) as response:
data = await response.json()
if not is_polling:
logger.info(f' <<< {data}')
# if not is_polling:
logger.info(f' <<< {data}')
return data
except Exception as ex:
import traceback