summaryrefslogtreecommitdiff
path: root/python/pgq/event.py
diff options
context:
space:
mode:
authorMarko Kreen2009-04-21 10:08:08 +0000
committerMarko Kreen2009-04-21 10:08:08 +0000
commit442c233239f0f860a8ef8cda19b04faec2a2f0be (patch)
tree8bae73a65a9549e7d6af9ff6bc7c5b87a1b409b3 /python/pgq/event.py
parent52720f5652984a2ef5e6b5e333fd97f3ee8799fd (diff)
pgq: Drop failed event handling.
Badly designed and unused concept. If such thing is needed it's much better to handle them via actual queue.
Diffstat (limited to 'python/pgq/event.py')
-rw-r--r--python/pgq/event.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/python/pgq/event.py b/python/pgq/event.py
index 80801b16..93745035 100644
--- a/python/pgq/event.py
+++ b/python/pgq/event.py
@@ -2,13 +2,12 @@
"""PgQ event container.
"""
-__all__ = ['EV_UNTAGGED', 'EV_RETRY', 'EV_DONE', 'EV_FAILED', 'Event']
+__all__ = ['EV_UNTAGGED', 'EV_RETRY', 'EV_DONE', 'Event']
# Event status codes
EV_UNTAGGED = -1
EV_RETRY = 0
EV_DONE = 1
-EV_FAILED = 2
_fldmap = {
'ev_id': 'ev_id',
@@ -39,13 +38,12 @@ class Event(object):
If not, events will stay in retry queue.
"""
__slots__ = ('_event_row', '_status', 'retry_time',
- 'fail_reason', 'queue_name')
+ 'queue_name')
def __init__(self, queue_name, row):
self._event_row = row
self._status = EV_UNTAGGED
self.retry_time = 60
- self.fail_reason = "Buggy consumer"
self.queue_name = queue_name
def __getattr__(self, key):
@@ -58,10 +56,6 @@ class Event(object):
self._status = EV_RETRY
self.retry_time = retry_time
- def tag_failed(self, reason):
- self._status = EV_FAILED
- self.fail_reason = reason
-
def get_status(self):
return self._status