Temporarily use crash handler around search CLI ep
parent
a98f5877bc
commit
b6ac6069fe
|
@ -482,20 +482,22 @@ def search(
|
||||||
):
|
):
|
||||||
return await func()
|
return await func()
|
||||||
|
|
||||||
quotes = trio.run(
|
from cornerboi._debug import open_crash_handler
|
||||||
main,
|
with open_crash_handler():
|
||||||
partial(
|
quotes = trio.run(
|
||||||
core.symbol_search,
|
main,
|
||||||
brokermods,
|
partial(
|
||||||
pattern,
|
core.symbol_search,
|
||||||
),
|
brokermods,
|
||||||
)
|
pattern,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
if not quotes:
|
if not quotes:
|
||||||
log.error(f"No matches could be found for {pattern}?")
|
log.error(f"No matches could be found for {pattern}?")
|
||||||
return
|
return
|
||||||
|
|
||||||
click.echo(colorize_json(quotes))
|
click.echo(colorize_json(quotes))
|
||||||
|
|
||||||
|
|
||||||
@cli.command()
|
@cli.command()
|
||||||
|
|
|
@ -145,7 +145,11 @@ async def symbol_search(
|
||||||
|
|
||||||
async with maybe_spawn_brokerd(
|
async with maybe_spawn_brokerd(
|
||||||
mod.name,
|
mod.name,
|
||||||
infect_asyncio=getattr(mod, '_infect_asyncio', False),
|
infect_asyncio=getattr(
|
||||||
|
mod,
|
||||||
|
'_infect_asyncio',
|
||||||
|
False,
|
||||||
|
),
|
||||||
) as portal:
|
) as portal:
|
||||||
|
|
||||||
results.append((
|
results.append((
|
||||||
|
|
Loading…
Reference in New Issue