chiark / gitweb /
rhodes: Look up the redundant workers using the correct query.
[rhodes] / rhodes
diff --git a/rhodes b/rhodes
index b9d97fa602241fccedce9748f371d7f1dd5a5619..8509a4fcf5a25d8afa755994fd830f51f53c84ba 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 = ?""",