Skip to content
This repository has been archived by the owner on May 9, 2018. It is now read-only.

Commit

Permalink
Fix filtered queue processing.
Browse files Browse the repository at this point in the history
  • Loading branch information
spladug committed Apr 26, 2012
1 parent 704a464 commit 319247d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions postcards/lib/queue.py
Expand Up @@ -36,10 +36,10 @@ def handle_queued_jobs(filter=None):
while True:
try:
query = (QueuedJob.query.filter(QueuedJob.id > last_id)
.order_by(db.asc(QueuedJob.id))
.limit(1))
.order_by(db.asc(QueuedJob.id)))
if filter:
query = query.filter(QueuedJob.handler == filter)
query = query.limit(1)
job = query.one()
except sqlalchemy.orm.exc.NoResultFound:
break
Expand Down
2 changes: 1 addition & 1 deletion process_queue.py
Expand Up @@ -12,4 +12,4 @@
elif len(sys.argv) == 2:
filter = sys.argv[1]

handle_queued_jobs()
handle_queued_jobs(filter)

0 comments on commit 319247d

Please sign in to comment.