fix: just guessing at this point....

This commit is contained in:
Jan-Ole Hübner 2024-05-13 13:17:43 +02:00
parent 9460736f03
commit 4733fed169

View file

@ -29,7 +29,7 @@ logger.addHandler(ch)
logger.setLevel(logging.INFO) logger.setLevel(logging.INFO)
__version__ = "v0.2.2" __version__ = "v0.2.3"
logger.info(__version__) logger.info(__version__)
client = InfluxDBClient(url=URL, token=TOKEN, org=ORG) client = InfluxDBClient(url=URL, token=TOKEN, org=ORG)
@ -51,6 +51,7 @@ def _incoming(pkg):
async def run(): async def run():
try:
conn = aiohttp.TCPConnector(limit_per_host=3) conn = aiohttp.TCPConnector(limit_per_host=3)
async with aiohttp.ClientSession(trust_env=True, connector=conn) as session: async with aiohttp.ClientSession(trust_env=True, connector=conn) as session:
@ -72,6 +73,9 @@ async def run():
while True: while True:
await asyncio.sleep(5) await asyncio.sleep(5)
except Exception as e:
logger.exception("Error occurred in run():")
raise e
loop = asyncio.new_event_loop() loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop) asyncio.set_event_loop(loop)