Merge pull request #34 from Codium-ai/enhancement/soft_and_hard_thresh

Separate output token threshold to soft and hard instead of implicit hard = soft/2
This commit is contained in:
Hussam Lawen
2023-07-11 14:35:00 +03:00
committed by GitHub
2 changed files with 9 additions and 8 deletions

View File

@ -38,6 +38,7 @@ async def polling_loop():
async with aiohttp.ClientSession() as session:
while True:
try:
await asyncio.sleep(5)
headers = {
"Accept": "application/vnd.github.v3+json",
"Authorization": f"Bearer {token}"
@ -86,10 +87,8 @@ async def polling_loop():
elif response.status != 304:
print(f"Failed to fetch notifications. Status code: {response.status}")
await asyncio.sleep(5)
except Exception as e:
logging.error(f"Exception during processing of a notification: {e}")
await asyncio.sleep(5)
if __name__ == '__main__':
asyncio.run(polling_loop())