Changeset View
Changeset View
Standalone View
Standalone View
swh/indexer/cli.py
Show All 9 Lines | |||||
from swh.scheduler.cli_utils import schedule_origin_batches | from swh.scheduler.cli_utils import schedule_origin_batches | ||||
from swh.storage import get_storage | from swh.storage import get_storage | ||||
from swh.indexer import metadata_dictionary | from swh.indexer import metadata_dictionary | ||||
from swh.indexer.storage import get_indexer_storage | from swh.indexer.storage import get_indexer_storage | ||||
from swh.indexer.storage.api.server import load_and_check_config, app | from swh.indexer.storage.api.server import load_and_check_config, app | ||||
CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help']) | CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help']) | ||||
ardumont: Can't we use the one from swh.core.cli (since it's the same)? | |||||
Not Done Inline ActionsWell, it's consistent with the rest but still ;) ardumont: Well, it's consistent with the rest but still ;) | |||||
Done Inline Actionsok ok ok will do douardda: ok ok ok will do | |||||
@click.group(context_settings=CONTEXT_SETTINGS) | @click.group(name='indexer', context_settings=CONTEXT_SETTINGS) | ||||
@click.option('--config-file', '-C', default=None, | @click.option('--config-file', '-C', default=None, | ||||
type=click.Path(exists=True, dir_okay=False,), | type=click.Path(exists=True, dir_okay=False,), | ||||
help="Configuration file.") | help="Configuration file.") | ||||
@click.pass_context | @click.pass_context | ||||
def cli(ctx, config_file): | def cli(ctx, config_file): | ||||
"""Software Heritage Indexer CLI interface | """Software Heritage Indexer CLI interface | ||||
""" | """ | ||||
ctx.ensure_object(dict) | ctx.ensure_object(dict) | ||||
▲ Show 20 Lines • Show All 148 Lines • Show Last 20 Lines |
Can't we use the one from swh.core.cli (since it's the same)?