From d7ca90748818946e1694f7f321011ca508713f56 Mon Sep 17 00:00:00 2001 From: Steven Robertson Date: Tue, 14 Feb 2012 10:31:24 -0800 Subject: [PATCH] Avoid spurious exceptions for now --- worker.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/worker.py b/worker.py index 6a4a87e..ea1a75f 100644 --- a/worker.py +++ b/worker.py @@ -207,8 +207,9 @@ def run_jobs(r, rev, jobs): else: print 'Got two responses for %d' % sidx if retry and retry[0] < sidx - 2 * QUEUE_LENGTH: - # TODO: better exception - raise ValueError("Double retry!") + # TODO: ensure that this doesn't happen accidentally; raise an + # appropriate exception when it does + print "Double retry!" expired, waiting[:] = partition(lambda w: w < sidx - QUEUE_LENGTH, waiting) for i in expired: