about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--etc/default_settings.py9
-rw-r--r--wqflask/maintenance/gen_select_dataset.py4
-rw-r--r--wqflask/utility/tools.py2
-rw-r--r--wqflask/wqflask/database.py2
4 files changed, 9 insertions, 8 deletions
diff --git a/etc/default_settings.py b/etc/default_settings.py
index 0fafb474..9b81e8c4 100644
--- a/etc/default_settings.py
+++ b/etc/default_settings.py
@@ -18,8 +18,9 @@ LOGFILE = HOME+"/genenetwork2.log"
 # 400 bad request response with no exception/log
 TRAP_BAD_REQUEST_ERRORS = True
 
-DB_URI = "mysql://gn2:mysql_password@localhost/db_webqtl_s"
+SQL_URI = "mysql://gn2:mysql_password@localhost/db_webqtl_s"
 SQLALCHEMY_DATABASE_URI = 'mysql://gn2:mysql_password@localhost/db_webqtl_s'
+SQLALCHEMY_POOL_RECYCLE = 3600
 
 # http://pythonhosted.org/Flask-Security/configuration.html
 SECURITY_CONFIRMABLE = True
@@ -28,7 +29,6 @@ SECURITY_REGISTERABLE = True
 SECURITY_RECOVERABLE = True
 SECURITY_EMAIL_SENDER = "no-reply@genenetwork.org"
 SECURITY_POST_LOGIN_VIEW = "/thank_you"
-SQLALCHEMY_POOL_RECYCLE = 3600
 
 SERVER_PORT = 5003
 SECRET_HMAC_CODE = '\x08\xdf\xfa\x93N\x80\xd9\\H@\\\x9f`\x98d^\xb4a;\xc6OM\x946a\xbc\xfc\x80:*\xebc'
@@ -37,10 +37,11 @@ SECRET_HMAC_CODE = '\x08\xdf\xfa\x93N\x80\xd9\\H@\\\x9f`\x98d^\xb4a;\xc6OM\x946a
 # be overridden at the module level and with enviroment settings
 WEBSERVER_MODE  = 'DEV'     # Python webserver mode (DEBUG|DEV|PROD)
 LOG_LEVEL       = 'WARNING' # Logger mode (DEBUG|INFO|WARNING|ERROR|CRITICAL)
-DEBUG_LOG_LEVEL = 1         # Debug log level (0-5)
-USE_REDIS       = True      # REDIS caching (note that redis will be phased out)
+LOG_LEVEL_DEBUG = 1         # Debug log level (0-5)
 LOG_SQL         = 'False'   # Log SQL/backend calls
 
+USE_REDIS       = True      # REDIS caching (note that redis will be phased out)
+
 # Path overrides for Genenetwork
 GENENETWORK_FILES = HOME+"/gn2_data"
 PYLMM_COMMAND = str.strip(os.popen("which pylmm_redis").read())
diff --git a/wqflask/maintenance/gen_select_dataset.py b/wqflask/maintenance/gen_select_dataset.py
index f91d3d88..d39bf4a5 100644
--- a/wqflask/maintenance/gen_select_dataset.py
+++ b/wqflask/maintenance/gen_select_dataset.py
@@ -258,7 +258,7 @@ def build_datasets(species, group, type_name):
 def main():
     """Generates and outputs (as json file) the data for the main dropdown menus on the home page"""
 
-    parse_db_uri(zach_settings.DB_URI)
+    parse_db_uri(zach_settings.SQL_URI)
 
     species = get_species()
     groups = get_groups(species)
@@ -297,6 +297,6 @@ def _test_it():
     #print("build_datasets:", pf(datasets))
 
 if __name__ == '__main__':
-    Conn = MySQLdb.Connect(**parse_db_uri(zach_settings.DB_URI))
+    Conn = MySQLdb.Connect(**parse_db_uri(zach_settings.SQL_URI))
     Cursor = Conn.cursor()
     main()
diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py
index bfb379f2..2affd130 100644
--- a/wqflask/utility/tools.py
+++ b/wqflask/utility/tools.py
@@ -169,7 +169,7 @@ def show_settings():
 # Cached values
 WEBSERVER_MODE     = get_setting('WEBSERVER_MODE')
 LOG_LEVEL          = get_setting('LOG_LEVEL')
-DEBUG_LOG_LEVEL    = get_setting_int('DEBUG_LOG_LEVEL')
+LOG_LEVEL_DEBUG    = get_setting_int('LOG_LEVEL_DEBUG')
 LOG_SQL            = get_setting_bool('LOG_SQL')
 USE_REDIS          = get_setting_bool('USE_REDIS')
 
diff --git a/wqflask/wqflask/database.py b/wqflask/wqflask/database.py
index 90612348..d7a1c8a8 100644
--- a/wqflask/wqflask/database.py
+++ b/wqflask/wqflask/database.py
@@ -4,7 +4,7 @@ from sqlalchemy.ext.declarative import declarative_base
 from wqflask import app
 
 #engine = create_engine('sqlite:////tmp/test.db', convert_unicode=True)
-engine = create_engine(app.config['DB_URI'], convert_unicode=True)
+engine = create_engine(app.config['SQL_URI'], convert_unicode=True)
 
 db_session = scoped_session(sessionmaker(autocommit=False,
                                          autoflush=False,