mirror of
https://github.com/planetmint/planetmint.git
synced 2025-11-25 06:55:45 +00:00
added argument reset_database
This commit is contained in:
parent
1e1a672143
commit
e9b421d887
@ -54,7 +54,7 @@ class TarantoolDB:
|
||||
|
||||
|
||||
def connect(host: str = None, port: int = None, username: str = "admin", password: str = "pass",
|
||||
backend: str = None):
|
||||
backend: str = None, reset_database: bool = False):
|
||||
backend = backend or get_planetmint_config_value_or_key_error('backend') # TODO Rewrite Configs
|
||||
host = host or get_planetmint_config_value_or_key_error('host')
|
||||
port = port or get_planetmint_config_value_or_key_error('port')
|
||||
@ -71,7 +71,7 @@ def connect(host: str = None, port: int = None, username: str = "admin", passwor
|
||||
raise ConfigurationError('Error loading backend `{}`'.format(backend)) from exc
|
||||
|
||||
logger.debug('Connection: {}'.format(Class))
|
||||
return Class(host=host, port=port, user=username, password=password)
|
||||
return Class(host=host, port=port, user=username, password=password, reset_database=reset_database)
|
||||
|
||||
|
||||
class Connection:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user