Changeset View
Changeset View
Standalone View
Standalone View
swh/lister/cli.py
Show All 20 Lines | @click.argument('listers', required=1, nargs=-1, | ||||
type=click.Choice(SUPPORTED_LISTERS + ['all'])) | type=click.Choice(SUPPORTED_LISTERS + ['all'])) | ||||
@click.option('--drop-tables', '-D', is_flag=True, default=False, | @click.option('--drop-tables', '-D', is_flag=True, default=False, | ||||
help='Drop tables before creating the database schema') | help='Drop tables before creating the database schema') | ||||
def cli(db_url, listers, drop_tables): | def cli(db_url, listers, drop_tables): | ||||
"""Initialize db model according to lister. | """Initialize db model according to lister. | ||||
""" | """ | ||||
override_conf = { | override_conf = { | ||||
'lister_db_url': db_url, | |||||
'lister': { | 'lister': { | ||||
'cls': 'local', | 'cls': 'local', | ||||
'args': {'db': db_url} | 'args': {'db': db_url} | ||||
} | } | ||||
} | } | ||||
if 'all' in listers: | if 'all' in listers: | ||||
listers = SUPPORTED_LISTERS | listers = SUPPORTED_LISTERS | ||||
▲ Show 20 Lines • Show All 85 Lines • Show Last 20 Lines |