mirror of
https://github.com/planetmint/planetmint.git
synced 2025-11-25 15:05:49 +00:00
added back config for localmongodb
This commit is contained in:
parent
7df59aa144
commit
fc5ea9d6d1
@ -9,8 +9,6 @@ import os
|
|||||||
from planetmint.log import DEFAULT_LOGGING_CONFIG as log_config
|
from planetmint.log import DEFAULT_LOGGING_CONFIG as log_config
|
||||||
from planetmint.version import __version__ # noqa
|
from planetmint.version import __version__ # 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
|
||||||
# basically, the port number is 9984
|
# basically, the port number is 9984
|
||||||
@ -22,8 +20,31 @@ from planetmint.version import __version__ # noqa
|
|||||||
|
|
||||||
_database_keys_map = { # TODO Check if it is working after removing 'name' field
|
_database_keys_map = { # TODO Check if it is working after removing 'name' field
|
||||||
'tarantool_db': ('host', 'port'),
|
'tarantool_db': ('host', 'port'),
|
||||||
|
'localmongodb': ('host', 'port', 'name')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_base_database_localmongodb = {
|
||||||
|
'host': 'localhost',
|
||||||
|
'port': 27017,
|
||||||
|
'name': 'bigchain',
|
||||||
|
'replicaset': None,
|
||||||
|
'login': None,
|
||||||
|
'password': None,
|
||||||
|
}
|
||||||
|
|
||||||
|
_database_localmongodb = {
|
||||||
|
'backend': 'localmongodb',
|
||||||
|
'connection_timeout': 5000,
|
||||||
|
'max_tries': 3,
|
||||||
|
'ssl': False,
|
||||||
|
'ca_cert': None,
|
||||||
|
'certfile': None,
|
||||||
|
'keyfile': None,
|
||||||
|
'keyfile_passphrase': None,
|
||||||
|
'crlfile': None,
|
||||||
|
}
|
||||||
|
_database_localmongodb.update(_base_database_localmongodb)
|
||||||
|
|
||||||
_base_database_tarantool_local_db = { # TODO Rewrite this configs for tarantool usage
|
_base_database_tarantool_local_db = { # TODO Rewrite this configs for tarantool usage
|
||||||
'host': 'localhost',
|
'host': 'localhost',
|
||||||
'port': 3301,
|
'port': 3301,
|
||||||
@ -56,9 +77,9 @@ _database_tarantool = {
|
|||||||
}
|
}
|
||||||
_database_tarantool.update(_base_database_tarantool_local_db)
|
_database_tarantool.update(_base_database_tarantool_local_db)
|
||||||
|
|
||||||
|
|
||||||
_database_map = {
|
_database_map = {
|
||||||
'tarantool_db': _database_tarantool
|
'tarantool_db': _database_tarantool,
|
||||||
|
'localmongodb': _database_localmongodb
|
||||||
}
|
}
|
||||||
config = {
|
config = {
|
||||||
'server': {
|
'server': {
|
||||||
@ -83,7 +104,7 @@ config = {
|
|||||||
'version': 'v0.31.5', # look for __tm_supported_versions__
|
'version': 'v0.31.5', # look for __tm_supported_versions__
|
||||||
},
|
},
|
||||||
# TODO Maybe remove hardcode configs for tarantool (review)
|
# TODO Maybe remove hardcode configs for tarantool (review)
|
||||||
'database': _database_map['tarantool_db'],
|
'database': _database_map,
|
||||||
'log': {
|
'log': {
|
||||||
'file': log_config['handlers']['file']['filename'],
|
'file': log_config['handlers']['file']['filename'],
|
||||||
'error_file': log_config['handlers']['errors']['filename'],
|
'error_file': log_config['handlers']['errors']['filename'],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user