Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

example-project: added a note about FIFO/LIFO post processing of items.

  • Loading branch information...
commit 31b16a9cae16153c828749885090c4a4cfef5e4e 1 parent 88929bf
@darkrho authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  example-project/process_items.py
View
3  example-project/process_items.py
@@ -7,7 +7,8 @@
def main():
r = redis.Redis()
while True:
- source, data = r.brpop(["dmoz:items"])
+ # process queue as FIFO, change `blpop` to `brpop` to process as LIFO
+ source, data = r.blpop(["dmoz:items"])
item = json.loads(data)
try:
print u"Processing: %(name)s <%(link)s>" % item
Please sign in to comment.
Something went wrong with that request. Please try again.