# HG changeset patch # User James Bergstra # Date 1232512217 18000 # Node ID 24237be52cfd9c31ea019b01345576bf9c5df613 # Parent 4e778197299974dac2933eab0d4659363284bf4a added priority-based dequeuing to sql.book_dct_postgres diff -r 4e7781972999 -r 24237be52cfd pylearn/dbdict/sql.py --- a/pylearn/dbdict/sql.py Mon Jan 19 18:35:43 2009 -0500 +++ b/pylearn/dbdict/sql.py Tue Jan 20 23:30:17 2009 -0500 @@ -86,6 +86,9 @@ # use dedicated column to retrieve jobs, not the dictionary keyval pair # This should be much faster. q = q.filter(db._Dict.status==START) + q = q.order_by(db._Dict.priority.desc()) + + # this doesn't seem to work, hene the string hack below q = q.options(eagerload('_attrs')) #hard-coded in api0 #try to reserve a dct