aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base/data_set/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask/base/data_set/__init__.py')
-rw-r--r--wqflask/base/data_set/__init__.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/wqflask/base/data_set/__init__.py b/wqflask/base/data_set/__init__.py
index e49c6a93..ad51e47e 100644
--- a/wqflask/base/data_set/__init__.py
+++ b/wqflask/base/data_set/__init__.py
@@ -6,11 +6,14 @@ import pickle as pickle
# 3rd-party imports
from redis import Redis
+from flask import current_app as app
# local imports
-from .dataset import DataSet
from base import webqtlConfig
-from utility.tools import USE_REDIS
+from wqflask.database import database_connection
+from utility.configuration import get_setting_bool
+
+from .dataset import DataSet
from .datasettype import DatasetType
from .tempdataset import TempDataSet
from .datasetgroup import DatasetGroup
@@ -18,7 +21,6 @@ from .utils import query_table_timestamp
from .genotypedataset import GenotypeDataSet
from .phenotypedataset import PhenotypeDataSet
from .mrnaassaydataset import MrnaAssayDataSet
-from wqflask.database import database_connection
# Used by create_database to instantiate objects
# Each subclass will add to this
@@ -113,7 +115,7 @@ def datasets(group_name, this_group=None, redis_conn=Redis()):
dataset_menu.append(dict(tissue=tissue_name,
datasets=[(dataset, dataset_short)]))
- if USE_REDIS:
+ if get_setting_bool("USE_REDIS"):
redis_conn.set(key, pickle.dumps(dataset_menu, pickle.HIGHEST_PROTOCOL))
redis_conn.expire(key, 60 * 5)