Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix filtered queue processing.

  • Loading branch information...
commit 319247db930c2d5f8edcd33ea41ce2103537b1a5 1 parent 704a464
@spladug spladug authored
Showing with 3 additions and 3 deletions.
  1. +2 −2 postcards/lib/queue.py
  2. +1 −1  process_queue.py
View
4 postcards/lib/queue.py
@@ -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
View
2  process_queue.py
@@ -12,4 +12,4 @@
elif len(sys.argv) == 2:
filter = sys.argv[1]
-handle_queued_jobs()
+handle_queued_jobs(filter)
Please sign in to comment.
Something went wrong with that request. Please try again.