fixed laoding until moduel cannot be resolved

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
Jürgen Eckel 2022-03-10 11:39:52 +01:00
parent 7e5e4c3102
commit c7ad9fcfe6
4 changed files with 11 additions and 9 deletions

View File

@ -8,10 +8,8 @@ import logging
import os import os
from planetmint.log import DEFAULT_LOGGING_CONFIG as log_config from planetmint.log import DEFAULT_LOGGING_CONFIG as log_config
from planetmint.lib import Planetmint # noqa
from planetmint.migrations.chain_migration_election import ChainMigrationElection
from planetmint.version import __version__ # noqa from planetmint.version import __version__ # noqa
from planetmint.core import App # noqa
# from functools import reduce # from functools import reduce
# PORT_NUMBER = reduce(lambda x, y: x * y, map(ord, 'Planetmint')) % 2**16 # PORT_NUMBER = reduce(lambda x, y: x * y, map(ord, 'Planetmint')) % 2**16

View File

@ -0,0 +1,5 @@
# Register the single dispatched modules on import.
from planetmint.backend.tarantool import schema, query, connection # noqa
# MongoDBConnection should always be accessed via
# ``planetmint.backend.connect()``.

View File

@ -8,16 +8,15 @@ from importlib import import_module
from itertools import repeat from itertools import repeat
import tarantool import tarantool
import planetmint
from planetmint.backend.exceptions import ConnectionError from planetmint.backend.exceptions import ConnectionError
from planetmint.backend.utils import get_planetmint_config_value, get_planetmint_config_value_or_key_error from planetmint.backend.utils import get_planetmint_config_value, get_planetmint_config_value_or_key_error
from planetmint.common.exceptions import ConfigurationError from planetmint.common.exceptions import ConfigurationError
BACKENDS = { # This is path to MongoDBClass #BACKENDS = { # This is path to MongoDBClass
'tarantool_db': 'planetmint.backend.connection_tarantool.TarantoolDB', # 'tarantool_db': 'planetmint.backend.connection_tarantool.TarantoolDB',
'localmongodb': 'planetmint.backend.localmongodb.connection.LocalMongoDBConnection' # 'localmongodb': 'planetmint.backend.localmongodb.connection.LocalMongoDBConnection'
} #}
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

View File

@ -21,7 +21,7 @@ from logging.config import dictConfig
import pytest import pytest
# from pymongo import MongoClient # from pymongo import MongoClient
from planetmint import ValidatorElection #from planetmint.upsert_validator import ValidatorElection
from planetmint.common import crypto from planetmint.common import crypto
from planetmint.common.transaction_mode_types import BROADCAST_TX_COMMIT from planetmint.common.transaction_mode_types import BROADCAST_TX_COMMIT
from planetmint.tendermint_utils import key_from_base64 from planetmint.tendermint_utils import key_from_base64