Use autoconfigure on every command

This commit is contained in:
vrde 2016-04-06 16:15:17 +02:00
parent aec3b3db6c
commit 4b32e8e01a
No known key found for this signature in database
GPG Key ID: 6581C7C39B3D397D
2 changed files with 4 additions and 4 deletions

View File

@ -70,7 +70,7 @@ def run_configure(args, skip_if_exists=False):
def run_init(args):
"""Initialize the database"""
bigchaindb.config_utils.file_config(args.config)
bigchaindb.config_utils.autoconfigure(filename=args.config, force=True)
# TODO Provide mechanism to:
# 1. prompt the user to inquire whether they wish to drop the db
# 2. force the init, (e.g., via -f flag)
@ -83,14 +83,14 @@ def run_init(args):
def run_drop(args):
"""Drop the database"""
bigchaindb.config_utils.file_config(args.config)
bigchaindb.config_utils.autoconfigure(filename=args.config, force=True)
db.drop(assume_yes=args.yes)
def run_start(args):
"""Start the processes to run the node"""
# run_configure(args, skip_if_exists=True)
bigchaindb.config_utils.file_config(args.config)
bigchaindb.config_utils.autoconfigure(filename=args.config, force=True)
try:
db.init()
except DatabaseAlreadyExists:

View File

@ -189,7 +189,7 @@ def autoconfigure(filename=None, config=None, force=False):
been initialized."""
if not force and bigchaindb.config.get('CONFIGURED'):
logger.info('System already configured, skipping autoconfiguration')
logger.debug('System already configured, skipping autoconfiguration')
return
newconfig = env_config(bigchaindb.config)