Changeset View
Changeset View
Standalone View
Standalone View
swh/indexer/cli.py
Show First 20 Lines • Show All 199 Lines • ▼ Show 20 Lines | ): | ||||
"""Schedules indexing tasks for origins that were already indexed.""" | """Schedules indexing tasks for origins that were already indexed.""" | ||||
from swh.scheduler.cli_utils import schedule_origin_batches | from swh.scheduler.cli_utils import schedule_origin_batches | ||||
idx_storage = ctx.obj["indexer_storage"] | idx_storage = ctx.obj["indexer_storage"] | ||||
scheduler = ctx.obj["scheduler"] | scheduler = ctx.obj["scheduler"] | ||||
origins = list_origins_by_producer(idx_storage, mappings, tool_ids) | origins = list_origins_by_producer(idx_storage, mappings, tool_ids) | ||||
kwargs = {"policy_update": "update-dups"} | kwargs = {"policy_update": "update-dups", "retries_left": 1} | ||||
schedule_origin_batches(scheduler, task_type, origins, origin_batch_size, kwargs) | schedule_origin_batches(scheduler, task_type, origins, origin_batch_size, kwargs) | ||||
@indexer_cli_group.command("journal-client") | @indexer_cli_group.command("journal-client") | ||||
@click.option("--scheduler-url", "-s", default=None, help="URL of the scheduler API") | @click.option("--scheduler-url", "-s", default=None, help="URL of the scheduler API") | ||||
@click.option( | @click.option( | ||||
"--origin-metadata-task-type", | "--origin-metadata-task-type", | ||||
default="index-origin-metadata", | default="index-origin-metadata", | ||||
▲ Show 20 Lines • Show All 85 Lines • Show Last 20 Lines |