Add `--pdb` support to `piker search`

ib_py311_fixes
Tyler Goodlet 2023-09-13 12:13:56 -04:00
parent 2c88ebe697
commit 30d55fdb27
1 changed files with 12 additions and 1 deletions

View File

@ -454,8 +454,18 @@ def mkt_info(
@cli.command() @cli.command()
@click.argument('pattern', required=True) @click.argument('pattern', required=True)
# TODO: move this to top level click/typer context for all subs
@click.option(
'--pdb',
is_flag=True,
help='Enable tractor debug mode',
)
@click.pass_obj @click.pass_obj
def search(config, pattern): def search(
config: dict,
pattern: str,
pdb: bool,
):
''' '''
Search for symbols from broker backend(s). Search for symbols from broker backend(s).
@ -468,6 +478,7 @@ def search(config, pattern):
async with maybe_open_pikerd( async with maybe_open_pikerd(
loglevel=config['loglevel'], loglevel=config['loglevel'],
debug_mode=pdb,
): ):
return await func() return await func()