summaryrefslogtreecommitdiff
path: root/scripts/queue_splitter.py
diff options
context:
space:
mode:
authorMarko Kreen2009-06-01 13:32:08 +0000
committerMarko Kreen2009-06-01 13:39:04 +0000
commitbe82460b0778e282336e0a73eec5b069cd59bb53 (patch)
tree59f36e8063218cebff6be4be8ab00b805d1e2c74 /scripts/queue_splitter.py
parent52fa34d45d19fe4843b77e7ff21a4f9e93832800 (diff)
python/pgq: relaxed event handling
.tag_done() call is no more required. Events are by default in 'done' state. In 2.x events were in 'retry' state by default, which was very bad idea in retrospect. Changing them to 'untagged' and still requiring tag_done() does not seem too good either. Original reasoning was to detect and survive errors in scripts, but the result was only confusion to everybody. So instead of assuming that script may be buggy, now we assume that script knows what it does. And only by explicit action can they be tagged as retry.
Diffstat (limited to 'scripts/queue_splitter.py')
-rwxr-xr-xscripts/queue_splitter.py1
1 files changed, 0 insertions, 1 deletions
diff --git a/scripts/queue_splitter.py b/scripts/queue_splitter.py
index 29ee0db0..dab23982 100755
--- a/scripts/queue_splitter.py
+++ b/scripts/queue_splitter.py
@@ -37,7 +37,6 @@ class QueueSplitter(pgq.SerialConsumer):
if queue not in cache:
cache[queue] = []
cache[queue].append(row)
- ev.tag_done()
# should match the composed row
fields = ['type', 'data', 'extra1', 'extra2', 'extra3', 'extra4', 'time']