From be82460b0778e282336e0a73eec5b069cd59bb53 Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Mon, 1 Jun 2009 16:32:08 +0300 Subject: 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. --- scripts/queue_splitter.py | 1 - 1 file changed, 1 deletion(-) (limited to 'scripts/queue_splitter.py') 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'] -- cgit v1.2.3