Changeset View
Changeset View
Standalone View
Standalone View
swh/scheduler/cli.py
Show First 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | |||||
@click.option('--database', '-d', default=None, | @click.option('--database', '-d', default=None, | ||||
help="Scheduling database DSN (imply cls is 'local')") | help="Scheduling database DSN (imply cls is 'local')") | ||||
@click.option('--url', '-u', default=None, | @click.option('--url', '-u', default=None, | ||||
help="Scheduler's url access (imply cls is 'remote')") | help="Scheduler's url access (imply cls is 'remote')") | ||||
@click.option('--log-level', '-l', default='INFO', | @click.option('--log-level', '-l', default='INFO', | ||||
type=click.Choice(logging._nameToLevel.keys()), | type=click.Choice(logging._nameToLevel.keys()), | ||||
help="Log level (default to INFO)") | help="Log level (default to INFO)") | ||||
@click.pass_context | @click.pass_context | ||||
def cli(ctx, config_file, cls, database, url, log_level): | def cli(ctx, config_file, database, url, log_level): | ||||
"""Software Heritage Scheduler CLI interface | """Software Heritage Scheduler CLI interface | ||||
Default to use the the local scheduler instance (plugged to the | Default to use the the local scheduler instance (plugged to the | ||||
main scheduler db). | main scheduler db). | ||||
""" | """ | ||||
from swh.scheduler.celery_backend.config import setup_log_handler | from swh.scheduler.celery_backend.config import setup_log_handler | ||||
log_level = setup_log_handler( | log_level = setup_log_handler( | ||||
▲ Show 20 Lines • Show All 561 Lines • Show Last 20 Lines |