chiark / gitweb /
rhodes: Look up the redundant workers using the correct query.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 28 May 2017 18:03:08 +0000 (19:03 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 19 Jun 2017 09:30:52 +0000 (10:30 +0100)
rhodes

diff --git a/rhodes b/rhodes
index b9d97fa..8509a4f 100755 (executable)
--- a/rhodes
+++ b/rhodes
@@ -465,7 +465,7 @@ def step(dir, cmd, *args):
       ## Kill off the other jobs working on this component.  If we crash now,
       ## we lose a bunch of work. :-(
       c.execute("""SELECT pid FROM workers WHERE p = ? AND k = ?""",
-                (str(p), k))
+                (str(p), k - 1))
       for pid, in c:
         if pid != mypid: maybe_kill_worker(dir, pid)
       c.execute("""DELETE FROM workers WHERE p = ? AND k = ?""",