aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base/data_set
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask/base/data_set')
-rw-r--r--wqflask/base/data_set/__init__.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/wqflask/base/data_set/__init__.py b/wqflask/base/data_set/__init__.py
index eaf80b19..6d475df2 100644
--- a/wqflask/base/data_set/__init__.py
+++ b/wqflask/base/data_set/__init__.py
@@ -31,18 +31,13 @@ DS_NAME_MAP = {
"ProbeSet": "MrnaAssayDataSet"
}
-# Do the intensive work at startup one time only
-# TODO: Pass in the Redis conniction from elsewhere to allow fo flexible
-# configuration
-Dataset_Getter = DatasetType(Redis())
-
def create_dataset(dataset_name, dataset_type=None,
- get_samplelist=True, group_name=None):
+ get_samplelist=True, group_name=None, redis_conn=Redis()):
if dataset_name == "Temp":
dataset_type = "Temp"
if not dataset_type:
- dataset_type = Dataset_Getter(dataset_name)
+ dataset_type = DatasetType(redis_conn)(dataset_name)
dataset_ob = DS_NAME_MAP[dataset_type]
dataset_class = globals()[dataset_ob]