ib: add connect status info emit

service_mng_to_tractor
Tyler Goodlet 2024-08-14 18:04:34 -04:00
parent 39b85f78fe
commit 29554e1821
1 changed files with 9 additions and 1 deletions

View File

@ -1250,6 +1250,12 @@ async def load_aio_clients(
for i in range(connect_retries):
try:
log.info(
'Trying `ib_async` connect\n'
f'{host}: {port}\n'
f'clientId: {client_id}\n'
f'timeout: {connect_timeout}\n'
)
await ib.connectAsync(
host,
port,
@ -1367,7 +1373,9 @@ async def load_clients_for_trio(
a ``tractor.to_asyncio.open_channel_from()``.
'''
async with load_aio_clients() as accts2clients:
async with load_aio_clients(
disconnect_on_exit=False,
) as accts2clients:
to_trio.send_nowait(accts2clients)