aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPjotr Prins2016-06-23 06:35:08 +0000
committerPjotr Prins2016-06-23 06:35:08 +0000
commit7d1daf02fad08abdece2e9b684e4ee7aff4c2b13 (patch)
tree1f0878fb39bb69614348dd2b6d6bef4961912408
parent758272e8717774475cdce0576d0f08b1fbf7585d (diff)
downloadgenenetwork2-7d1daf02fad08abdece2e9b684e4ee7aff4c2b13.tar.gz
Settings: add GN_SERVER_URL
-rw-r--r--etc/default_settings.py1
-rw-r--r--wqflask/db/call.py2
-rw-r--r--wqflask/utility/tools.py1
3 files changed, 3 insertions, 1 deletions
diff --git a/etc/default_settings.py b/etc/default_settings.py
index b0060ed3..29bc2133 100644
--- a/etc/default_settings.py
+++ b/etc/default_settings.py
@@ -17,6 +17,7 @@ import sys
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
+GN_SERVER_URL = "http://localhost:8880/"
# Flask configuration (see website)
TRAP_BAD_REQUEST_ERRORS = True
diff --git a/wqflask/db/call.py b/wqflask/db/call.py
index 8b47c0ba..ecffdfa1 100644
--- a/wqflask/db/call.py
+++ b/wqflask/db/call.py
@@ -44,7 +44,7 @@ def gn_server(path):
"""
with Bench("GN_SERVER",LOG_SQL):
- res = urllib2.urlopen("http://localhost:8880/"+path)
+ res = urllib2.urlopen(GN_SERVER_URL+path)
rest = res.read()
res2 = json.loads(rest)
logger.info(res2)
diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py
index c467fa74..21c9c1b7 100644
--- a/wqflask/utility/tools.py
+++ b/wqflask/utility/tools.py
@@ -168,6 +168,7 @@ def show_settings():
# Cached values
WEBSERVER_MODE = get_setting('WEBSERVER_MODE')
+GN_SERVER_URL = get_setting('GN_SERVER_URL')
LOG_LEVEL = get_setting('LOG_LEVEL')
LOG_LEVEL_DEBUG = get_setting_int('LOG_LEVEL_DEBUG')
LOG_SQL = get_setting_bool('LOG_SQL')