aboutsummaryrefslogtreecommitdiff
path: root/sheepdog/worker.py
diff options
context:
space:
mode:
authorBonfaceKilz2021-03-10 15:16:52 +0300
committerBonfaceKilz2021-03-10 15:16:52 +0300
commitf6fb8fc46aea76e9c4011a091b9a86306b72d42d (patch)
treea0ca622b655e89732a411c4db2184f42d0549c70 /sheepdog/worker.py
parentecdfb6d2e13ad66f90d961d44fc69c13a2a2d4a4 (diff)
downloadgenenetwork3-f6fb8fc46aea76e9c4011a091b9a86306b72d42d.tar.gz
Use the correct id to fetch cmd status
Diffstat (limited to 'sheepdog/worker.py')
-rw-r--r--sheepdog/worker.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sheepdog/worker.py b/sheepdog/worker.py
index 6299ca7..4e3610e 100644
--- a/sheepdog/worker.py
+++ b/sheepdog/worker.py
@@ -16,7 +16,7 @@ def run_jobs(conn):
cmd_id = (conn.lpop("GN3::job-queue") or b'').decode("utf-8")
if bool(cmd_id):
cmd = conn.hget(name=cmd_id, key="cmd")
- if cmd and (conn.hget(cmd, "status") == b"queued"):
+ if cmd and (conn.hget(cmd_id, "status") == b"queued"):
result = run_cmd(cmd.decode("utf-8"))
conn.hset(name=cmd_id, key="result", value=result.get("output"))
if result.get("code") == 0: # Success