Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
.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.
|
|
Badly designed and unused concept. If such thing is needed
it's much better to handle them via actual queue.
|
|
- 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
|
|
|
|
queue
|
|
|