Skip to content
Snippets Groups Projects
Commit 73b7c079 authored by Gunnar Schaefer's avatar Gunnar Schaefer
Browse files

Sync sample.config with default map in config.py

- add two new variables to sample.config
- update defaults in config.py to be strings as that's how environment
  variables come in by default
parent 675f9289
No related branches found
No related tags found
No related merge requests found
......@@ -19,6 +19,7 @@ logging.getLogger('requests').setLevel(logging.WARNING) # silence Requests libra
logging.getLogger('paste.httpserver').setLevel(logging.WARNING) # silence Paste library
# NOTE: Keep in sync with environment variables in sample.config file.
DEFAULT_CONFIG = {
'core': {
'log_level': 'info',
......@@ -44,8 +45,8 @@ DEFAULT_CONFIG = {
},
'persistent': {
'db_uri': 'mongodb://localhost:9001/scitran',
'db_connect_timeout': 5000,
'db_server_selection_timeout': 10000,
'db_connect_timeout': '2000',
'db_server_selection_timeout': '3000',
'data_path': os.path.join(os.path.dirname(__file__), '../persistent/data'),
},
}
......@@ -80,6 +81,7 @@ db = pymongo.MongoClient(
connectTimeoutMS=__config['persistent']['db_connect_timeout'],
serverSelectionTimeoutMS=__config['persistent']['db_server_selection_timeout']
).get_default_database()
log.debug(str(db))
def initialize_db():
......
......@@ -24,6 +24,8 @@
#SCITRAN_PERSISTENT_DB_PATH="./persistent/db" # for fine-grain control
#SCITRAN_PERSISTENT_DB_PORT=9001
#SCITRAN_PERSISTENT_DB_URI="mongodb://localhost:$SCITRAN_PERSISTENT_DB_PORT/scitran"
#SCITRAN_PERSISTENT_DB_CONNECT_TIMEOUT=2000
#SCITRAN_PERSISTENT_DB_SERVER_SELECTION_TIMEOUT=3000
#SCITRAN_AUTH_AUTH_ENDPOINT=""
#SCITRAN_AUTH_CLIENT_ID=""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment