changeset 639:b79c4e1bbd7d

Add "FUCKED_UP" (666) status.
author Pascal Lamblin <lamblinp@iro.umontreal.ca>
date Thu, 22 Jan 2009 21:14:03 -0500
parents 4b1bb5810423
children ac6e7ce28f70
files pylearn/dbdict/sql.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pylearn/dbdict/sql.py	Wed Jan 21 18:53:35 2009 -0500
+++ b/pylearn/dbdict/sql.py	Thu Jan 22 21:14:03 2009 -0500
@@ -25,6 +25,7 @@
 START = 0
 RUNNING = 1
 DONE = 2
+FUCKED_UP = 666
 
 _TEST_CONCURRENCY = False
 
@@ -227,7 +228,7 @@
     else:
         s = session
 
-    do_insert = force_dup or (None is s.query(db._Dict).filter(db._Dict.hash==jobhash).first())
+    do_insert = force_dup or (None is s.query(db._Dict).filter(db._Dict.hash==jobhash).filter(db._Dict.status!=FUCKED_UP).first())
 
     rval = None
     if do_insert: