Skip to content

Commit

Permalink
fix download order
Browse files Browse the repository at this point in the history
  • Loading branch information
gisab committed Aug 31, 2016
1 parent 357e6dd commit 3e3066f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/libQueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def getItem(self,lockpid='#',fromStatus='#',toStatus='#', dwnStatus='#', olderth
#get withoud locking the first avaiable item in the list
#Patch to give priority to Emergency products
#qry="SELECT ID, STATUS FROM queue where %s order by LAST_UPDATE ASC limit 1;" % (qwhere)
qry="SELECT ID, STATUS FROM queue where " + qwhere + " order by (if (note like '%\"EM_%','EM','ZZ')) ASC, LAST_UPDATE ASC limit 1;"
qry="SELECT ID, STATUS FROM queue where " + qwhere + " order by (if ((note like '%\"EM_%') or (note like '%\"IU_%'),'EM','ZZ')) ASC, LAST_UPDATE ASC limit 1;"
self.db.cur.execute(qry)
rec=self.db.cur.fetchone()
if rec==None:
Expand Down

0 comments on commit 3e3066f

Please sign in to comment.