aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility/temp_data.py
diff options
context:
space:
mode:
authorZachary Sloan2013-04-17 23:49:47 +0000
committerZachary Sloan2013-04-17 23:49:47 +0000
commitea53a2f20d13130f3555967d57282b3c9562da5a (patch)
tree6bf929eb232b957867d62e31fee2dc7aff49f522 /wqflask/utility/temp_data.py
parent296d7dec13a57519e64e99ab7c3a4673447c026f (diff)
downloadgenenetwork2-ea53a2f20d13130f3555967d57282b3c9562da5a.tar.gz
Created file with pickled SNPIterator (from input.py) data
for HLC datasets Still need to read in file
Diffstat (limited to 'wqflask/utility/temp_data.py')
-rw-r--r--wqflask/utility/temp_data.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/wqflask/utility/temp_data.py b/wqflask/utility/temp_data.py
index 004d45c6..ddf2653c 100644
--- a/wqflask/utility/temp_data.py
+++ b/wqflask/utility/temp_data.py
@@ -5,14 +5,16 @@ import simplejson as json
class TempData(object):
- def __init__(self, temp_uuid):
+ def __init__(self, temp_uuid, part=None):
self.temp_uuid = temp_uuid
self.redis = Redis()
self.key = "tempdata:{}".format(self.temp_uuid)
+ if part:
+ self.key += ":{}".format(part)
def store(self, field, value):
self.redis.hset(self.key, field, value)
- self.redis.expire(self.key, 60*15) # Expire in 15 minutes
+ self.redis.expire(self.key, 60*60) # Expire in 60 minutes
def get_all(self):
return self.redis.hgetall(self.key)