mirror of
https://github.com/planetmint/planetmint.git
synced 2025-11-25 06:55:45 +00:00
fixed config loading issue
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
parent
fc5ea9d6d1
commit
28750d06bd
@ -9,13 +9,15 @@ from importlib import import_module
|
||||
from planetmint.backend.utils import get_planetmint_config_value
|
||||
|
||||
BACKENDS = { # This is path to MongoDBClass
|
||||
'tarantool_db': r'planetmint.backend.tarantool.connection.TarantoolDB',
|
||||
'tarantool_db': 'planetmint.backend.tarantool.connection.TarantoolDB',
|
||||
'localmongodb': 'planetmint.backend.localmongodb.connection.LocalMongoDBConnection'
|
||||
}
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
backend = get_planetmint_config_value("backend")
|
||||
if not backend:
|
||||
backend = 'tarantool_db'
|
||||
|
||||
modulepath, _, class_name = BACKENDS[backend].rpartition('.')
|
||||
current_backend = getattr(import_module(modulepath), class_name)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user