Fix an error path in job queue worker's RunTask
authorIustin Pop <iustin@google.com>
Sun, 19 Jul 2009 02:01:16 +0000 (04:01 +0200)
committerIustin Pop <iustin@google.com>
Sun, 19 Jul 2009 11:33:54 +0000 (13:33 +0200)
In case the job fails, we try to set the job's run_op_idx to -1.
However, this is a wrong variable, which wasn't detected until the
__slots__ addition. The correct variable is run_op_index.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

lib/jqueue.py

index 7819914..3f53332 100644 (file)
@@ -455,7 +455,7 @@ class _JobQueueWorker(workerpool.BaseWorker):
       queue.acquire()
       try:
         try:
-          job.run_op_idx = -1
+          job.run_op_index = -1
           job.end_timestamp = TimeStampNow()
           queue.UpdateJobUnlocked(job)
         finally: