summaryrefslogtreecommitdiff
path: root/python/pgq/consumer.py
AgeCommit message (Collapse)Author
2013-11-11python/pgq: fixes (event & walker)martinko
2013-09-19python: amendmentsmartinko
2013-07-07pgq: move RetriableEvent to consumer.pyMarko Kreen
It's hard to get overview if the retry-related code is laying around in different places. As only Consumer class deals with retry, move all crap into same file.
2013-07-07pgq.Consumer: non-lazy loading should use RetriableEventMarko Kreen
2013-06-20pgq: Consumer class also need _make_event, for _load_batch_events_old()Marko Kreen
2013-01-28PGQ: same bug different place...Petr Jelinek
2013-01-28Pgq: fix RetriableBatchWalker initializationPetr Jelinek
2013-01-24Initialize Event properly in BaseConsumerPetr Jelinek
2013-01-11Move more of retry logic away from BaseConsumer/Event classesPetr Jelinek
2013-01-08Refactor Consumer code.Petr Jelinek
Common code from pgq.Consumer goes into new pgq.BaseConsumer, pgq.Consumer and pgq.LocalConsumer are now subclasses of pgq.BaseConsumer and pgq.Consumer adds retry api/logic. pgq.Event code is now split between pgq.Event and pgq.RetriableEvent. These changes reflect the fact that pgq.LocalConsumer should not be allowed to use retry logic.
2012-10-19white noisemartinko
2012-09-19adjusted default keepalive_stats from 61 to 300 secondsAsko Oja
2012-09-19Added keepalive_stats parameter for consumer that controls how often idle ↵Asko Oja
consumer logs idle time. Also added rounding to milliseconds for logged durations
2012-09-18consumer logs again idle time spent waiting for eventsAsko Oja
2012-07-17pgq.Consumer: 'table_filter' - filter for ev_extra1Marko Kreen
2011-10-27pgq.Consumer: support .consumer_filter with lazy_fetchMarko Kreen
2011-10-04pgq.Consumer: pgq_autocommit config paramsMarko Kreen
for setting source side db into autocommit mode
2011-02-04python/pgq: batch_info cleanupMarko Kreen
- move batch_info compat from sql to python - get rid of get_batch_info(), self.batch_info is always defined - make remoteconsumer use self.batch_info
2010-12-20fixed local_only functionality, structural changesAsko Tiidumaa
2010-12-20added local_only to londiste config parameter - accepts only events for ↵Asko Tiidumaa
local tables
2010-11-29pgq.consumer: rename next_batch_custom result fieldsMarko Kreen
fields names are out-of-sync with get_batch_info()..
2010-11-24pgq.BatchWalker: relaxed __len__(), ignore out-of-order callsMarko Kreen
2010-06-11pgq.Consumer: Provide self.batch_info with batch detailsMarko Kreen
2010-04-28pgq.Consumer: remove hardwired cursor nameMarko Kreen
2009-11-04pgq.Consumer: report new class vars in top-levelMarko Kreen
2009-11-03fix pgq brokenness related to recent commitsMarko Kreen
- get_batch_cursor() - loop_delay
2009-09-21DBScript: Simplify looping and docstring handlingMarko Kreen
- looping: remove .do_single_loop and .looping variables, let only .loop_delay control looping. If loop_delay is missing from confing or 0, then instead sleep, the script will exit. - docstr: print docstring fragments recursively, so each class needs to only document its own parameters. - londiste.py: use Replicator class to print default config as it has proper class inheritance.
2009-09-11pgq.Consumer: use next_batch_custom()Marko Kreen
This brings new configurable params: pgq_min_delay, pgq_min_count, pgq_min_lag make them also reloadable via SIGHUP.
2009-09-11pgq.Consumer: use lazy_fetch by defaultMarko Kreen
New default_lazy_fetch class var to allow subclasses to turn it off.
2009-09-11pgq.Consumer: use get_batch_cursor()Marko Kreen
2009-09-10londiste: on error, apply sql on-by-oneMarko Kreen
Check whether last loop got error (work_state = -1) and apply sql one-by-one if thats true. Also, apply TRUNCATE separately from other SQL.
2009-09-09pgq.CoopConsumer for PythonMarko Kreen
Simply wrapper around Consumer which redirects few calls to pgq_coop schema.
2009-06-01python/pgq: relaxed event handlingMarko Kreen
.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.
2009-04-21pgq: Drop failed event handling.Marko Kreen
Badly designed and unused concept. If such thing is needed it's much better to handle them via actual queue.
2009-02-13python/pgq updateMarko Kreen
- remove the obsolete setconsumer stuff - New CascadedConsumer / CascadedWorker classes, that are based on regular pgq.Consumer - move RemoteConsumer / SerialConsumer out of pgq/consumer.py pgq.Consumer: - rename conf params and instance variables: pgq_queue_name -> queue_name pgq_consumer_id -> consumer_name - disable automatic registration on the queue, now script needs to be called with switches --register / --unregister - drop code to read from multiple-queues at once pgq.ticker: - drop event seq tracking code, this is now done in db
2008-04-22pgq.Consumer - complain on untagged events, instead of sending them to retry ↵Marko Kreen
queue
2008-04-17fix retry/failed event handling in pgq.ConsumerMarko Kreen
2008-04-16fix more bugs - stats, trigger typeMarko Kreen
2007-09-17experimental lazy event fetchingMarko Kreen
2007-07-23pgq: aquire cur_tick also, although not used atmMarko Kreen
2007-07-20pgq.SerialConsumer: move tick queries to separate functions to allow ↵Marko Kreen
overriding them if needed
2007-07-20pgq.SerialConsumer: use functions instead of direct access at tablesMarko Kreen
2007-07-16pgq.consumer: dont allow big seeking aroundMarko Kreen
2007-03-13final public releaseskytools_2_1Marko Kreen