Changeset View
Changeset View
Standalone View
Standalone View
swh/scheduler/cli/task.py
Show First 20 Lines • Show All 360 Lines • ▼ Show 20 Lines | |||||
@task.command('list') | @task.command('list') | ||||
@click.option('--task-id', '-i', default=None, multiple=True, metavar='ID', | @click.option('--task-id', '-i', default=None, multiple=True, metavar='ID', | ||||
help='List only tasks whose id is ID.') | help='List only tasks whose id is ID.') | ||||
@click.option('--task-type', '-t', default=None, multiple=True, metavar='TYPE', | @click.option('--task-type', '-t', default=None, multiple=True, metavar='TYPE', | ||||
help='List only tasks of type TYPE') | help='List only tasks of type TYPE') | ||||
@click.option('--limit', '-l', required=False, type=click.INT, | @click.option('--limit', '-l', required=False, type=click.INT, | ||||
help='The maximum number of tasks to fetch.') | help='The maximum number of tasks to fetch.') | ||||
@click.option('--status', '-s', multiple=True, metavar='STATUS', | @click.option('--status', '-s', multiple=True, metavar='STATUS', | ||||
type=click.Choice( | |||||
('next_run_not_scheduled', 'next_run_scheduled', | |||||
'completed', 'disabled')), | |||||
default=None, | default=None, | ||||
help='List tasks whose status is STATUS.') | help='List tasks whose status is STATUS.') | ||||
@click.option('--policy', '-p', default=None, | @click.option('--policy', '-p', default=None, | ||||
type=click.Choice(['recurring', 'oneshot']), | type=click.Choice(['recurring', 'oneshot']), | ||||
help='List tasks whose policy is POLICY.') | help='List tasks whose policy is POLICY.') | ||||
@click.option('--priority', '-P', default=None, multiple=True, | @click.option('--priority', '-P', default=None, multiple=True, | ||||
type=click.Choice(['all', 'low', 'normal', 'high']), | type=click.Choice(['all', 'low', 'normal', 'high']), | ||||
help='List tasks whose priority is PRIORITY.') | help='List tasks whose priority is PRIORITY.') | ||||
▲ Show 20 Lines • Show All 188 Lines • Show Last 20 Lines |