Changeset View
Changeset View
Standalone View
Standalone View
swh/scheduler/cli/task.py
Show First 20 Lines • Show All 340 Lines • ▼ Show 20 Lines | ): | ||||
if dry_run: | if dry_run: | ||||
scheduler = None | scheduler = None | ||||
(args, kw) = parse_options(options) | (args, kw) = parse_options(options) | ||||
if args: | if args: | ||||
raise click.ClickException("Only keywords arguments are allowed.") | raise click.ClickException("Only keywords arguments are allowed.") | ||||
origins = iter_origins(storage, origin_from=min_id, origin_to=max_id) | origins = iter_origins(storage, origin_from=min_id, origin_to=max_id) | ||||
origin_urls = (origin["url"] for origin in origins) | origin_urls = (origin.url for origin in origins) | ||||
schedule_origin_batches(scheduler, type, origin_urls, origin_batch_size, kw) | schedule_origin_batches(scheduler, type, origin_urls, origin_batch_size, kw) | ||||
@task.command("list-pending") | @task.command("list-pending") | ||||
@click.argument("task-types", required=True, nargs=-1) | @click.argument("task-types", required=True, nargs=-1) | ||||
@click.option( | @click.option( | ||||
"--limit", | "--limit", | ||||
▲ Show 20 Lines • Show All 363 Lines • Show Last 20 Lines |