diff options
author | Frederick Muriuki Muriithi | 2023-06-22 12:12:26 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-06-22 12:12:26 +0300 |
commit | 7d669eed50a0e39eaa2b4a4769e5d9bbefdb997a (patch) | |
tree | 585943056bd7df17e312da3a13a2d87ac12d259c /wqflask/base/data_set/__init__.py | |
parent | 490b0bf8cc5891a23c8850185d21987b5476ba4f (diff) | |
download | genenetwork2-7d669eed50a0e39eaa2b4a4769e5d9bbefdb997a.tar.gz |
Fetch configs from app object not modulesdecouple_tools_and_wqflask_app
Diffstat (limited to 'wqflask/base/data_set/__init__.py')
-rw-r--r-- | wqflask/base/data_set/__init__.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/wqflask/base/data_set/__init__.py b/wqflask/base/data_set/__init__.py index e49c6a93..27955f8a 100644 --- a/wqflask/base/data_set/__init__.py +++ b/wqflask/base/data_set/__init__.py @@ -6,11 +6,12 @@ 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 utility.tools import get_setting_bool from .datasettype import DatasetType from .tempdataset import TempDataSet from .datasetgroup import DatasetGroup @@ -113,7 +114,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(app, "USE_REDIS"): redis_conn.set(key, pickle.dumps(dataset_menu, pickle.HIGHEST_PROTOCOL)) redis_conn.expire(key, 60 * 5) |