fix: just guessing at this point....
This commit is contained in:
parent
9460736f03
commit
4733fed169
1 changed files with 22 additions and 18 deletions
6
pulse.py
6
pulse.py
|
@ -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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue