aboutsummaryrefslogtreecommitdiff
path: root/gn3/commands.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2022-03-08 08:07:38 +0300
committerFrederick Muriuki Muriithi2022-03-08 08:07:38 +0300
commite30f9a9b746f7dcdc8707e66cc65e580e6f83f47 (patch)
tree2edbbe2ff8957daf22ec60a562a633bdfa064723 /gn3/commands.py
parenteae345ed252c01e541d64c7e5b60b488d84268c6 (diff)
downloadgenenetwork3-e30f9a9b746f7dcdc8707e66cc65e580e6f83f47.tar.gz
Fix tests, and issues caught by tests
Fix some issues caught by tests due to changes introducing the hand-off of the partial correlations computations to an external process Fix some issues due to the changes that introduce context managers for database connections Update some tests to take the above two changes into consideration
Diffstat (limited to 'gn3/commands.py')
-rw-r--r--gn3/commands.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/gn3/commands.py b/gn3/commands.py
index 29e3df2..0e0b53c 100644
--- a/gn3/commands.py
+++ b/gn3/commands.py
@@ -84,11 +84,12 @@ Returns the name of the specific redis hash for the specific task.
f"{str(uuid4())}")
conn.rpush(job_queue, unique_id)
for key, value in {
- "cmd": json.dumps(cmd), "result": "", "status": "queued",
- "env": json.dumps(env)}.items():
+ "cmd": json.dumps(cmd), "result": "", "status": "queued"}.items():
conn.hset(name=unique_id, key=key, value=value)
if email:
conn.hset(name=unique_id, key="email", value=email)
+ if env:
+ conn.hset(name=unique_id, key="env", value=json.dumps(env))
return unique_id