reformated config

This commit is contained in:
andrei 2022-02-23 13:45:50 +02:00
parent e9b421d887
commit 24716d41ba
3 changed files with 12 additions and 14 deletions

View File

@ -42,10 +42,6 @@ _database_tarantool = {
} }
_database_tarantool.update(_base_database_tarantool_local_db) _database_tarantool.update(_base_database_tarantool_local_db)
_database_map = {
'tarantool_db': _database_tarantool,
}
init_config = { init_config = {
"init_file": "init_db.txt", "init_file": "init_db.txt",
"relative_path": "backend/tarantool/" "relative_path": "backend/tarantool/"
@ -55,7 +51,16 @@ drop_config = {
"drop_file": "drop_db.txt", "drop_file": "drop_db.txt",
"relative_path": "backend/tarantool/" "relative_path": "backend/tarantool/"
} }
_database_map = {
'tarantool_db': _database_tarantool,
"ctl_config": {
"login": "admin",
"host": "admin:pass@127.0.0.1:3301",
"service": "tarantoolctl connect",
"init_config": init_config,
"drop_config": drop_config
},
}
config = { config = {
'server': { 'server': {
# Note: this section supports all the Gunicorn settings: # Note: this section supports all the Gunicorn settings:
@ -65,13 +70,6 @@ config = {
log_config['handlers']['console']['level']).lower(), log_config['handlers']['console']['level']).lower(),
'workers': None, # if None, the value will be cpu_count * 2 + 1 'workers': None, # if None, the value will be cpu_count * 2 + 1
}, },
"ctl_config": {
"login": "admin",
"host": "admin:pass@127.0.0.1:3301",
"service": "tarantoolctl connect",
"init_config": init_config,
"drop_config": drop_config
},
'wsserver': { 'wsserver': {
'scheme': 'ws', 'scheme': 'ws',
'host': 'localhost', 'host': 'localhost',

View File

@ -18,7 +18,7 @@ def test_get_txids_filtered(signed_create_tx, signed_transfer_tx):
from planetmint.backend import connect from planetmint.backend import connect
from planetmint.backend.tarantool import query from planetmint.backend.tarantool import query
from planetmint.models import Transaction from planetmint.models import Transaction
conn = connect().get_connection() conn = connect(reset_database=True).get_connection()
# create and insert two blocks, one for the create and one for the # create and insert two blocks, one for the create and one for the
# transfer transaction # transfer transaction
create_tx_dict = signed_create_tx.to_dict() create_tx_dict = signed_create_tx.to_dict()

View File

@ -113,7 +113,7 @@ def _configure_planetmint(request):
@pytest.fixture(scope='session') @pytest.fixture(scope='session')
def _setup_database(_configure_planetmint): # TODO Here is located setup database def _setup_database(_configure_planetmint): # TODO Here is located setup database
from planetmint.backend.connection_tarantool import init_tarantool, drop_tarantool # from planetmint.backend.connection_tarantool import init_tarantool, drop_tarantool
# print('Initializing test db') # print('Initializing test db')
# init_tarantool() # init_tarantool()
# print('Finishing init database') # print('Finishing init database')