aboutsummaryrefslogtreecommitdiff
path: root/gn3
diff options
context:
space:
mode:
authorBonfaceKilz2021-03-10 15:13:45 +0300
committerBonfaceKilz2021-03-10 15:13:45 +0300
commitecdfb6d2e13ad66f90d961d44fc69c13a2a2d4a4 (patch)
treeee35814988b3d8de2751bab541bec573821157ca /gn3
parent8478bc9ee572224fe3b76696de85d1c9a7a89399 (diff)
downloadgenenetwork3-ecdfb6d2e13ad66f90d961d44fc69c13a2a2d4a4.tar.gz
Queue the command only once
Diffstat (limited to 'gn3')
-rw-r--r--gn3/commands.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gn3/commands.py b/gn3/commands.py
index e5558fe..4b0d62d 100644
--- a/gn3/commands.py
+++ b/gn3/commands.py
@@ -52,9 +52,9 @@ Returns the name of the specific redis hash for the specific task.
unique_id = ("cmd::"
f"{datetime.now().strftime('%Y-%m-%d%H-%M%S-%M%S-')}"
f"{str(uuid4())}")
+ conn.rpush(job_queue, unique_id)
for key, value in {"cmd": cmd, "result": "", "status": "queued"}.items():
conn.hset(name=unique_id, key=key, value=value)
- conn.rpush(job_queue, unique_id)
if email:
conn.hset(name=unique_id, key="email", value=email)
return unique_id