aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZachary Sloan2013-03-09 00:08:15 +0000
committerZachary Sloan2013-03-09 00:08:15 +0000
commit990d72e48c9fbf3fa976e435ad7645cfb8f3301d (patch)
treef8b0f051fd230ec34d4bd5cd523952aeee9c5525
parent555c1de4945fbf7c748357bbb25497825dac9a8b (diff)
downloadgenenetwork2-990d72e48c9fbf3fa976e435ad7645cfb8f3301d.tar.gz
Trying to get caching working with pickle now
-rw-r--r--wqflask/wqflask/views.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index 4f8e5890..c8432877 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -167,11 +167,13 @@ def marker_regression_page():
if key in wanted or key.startswith(('value:')):
start_vars[key] = value
- key = "marker_regression:v2:" + json.dumps(start_vars, sort_keys=True)
+ version = "v5"
+ print("version is:", version)
+ key = "marker_regression:{}:".format(version) + json.dumps(start_vars, sort_keys=True)
result = Redis.get(key)
print("************************ Starting result *****************")
- print("result is [{}]: {}".format(type(result), result))
+ #print("result is [{}]: {}".format(type(result), result))
print("************************ Ending result ********************")
if result:
@@ -181,7 +183,8 @@ def marker_regression_page():
import __builtin__
import reaper
__builtin__.Dataset = reaper.Dataset
- result = yaml.load(result)
+ #result = yaml.load(result)
+ result = pickle.loads(result)
print("Done loading yaml")
else:
@@ -198,7 +201,7 @@ def marker_regression_page():
print(" ---**--- {}: {}".format(type(item), item))
#causeerror
- Redis.set(key, yaml.dump(result))
+ Redis.set(key, pickle.dumps(result))
Redis.expire(key, 60*60)
return render_template("marker_regression.html", **result)