summaryrefslogtreecommitdiff
path: root/python/pgq/event.py
diff options
context:
space:
mode:
authormartinko2013-08-09 14:03:34 +0000
committermartinko2013-08-09 14:03:34 +0000
commit49ac8090682a5d76b577eeade3e29c9e4d83650c (patch)
tree0bd7141f24ccaa9cdaf2120006263bfe47d4f36a /python/pgq/event.py
parentaae5c5b1dde3e456189cdff0fa1cd7b5cb369aa8 (diff)
parent344d063d4e61bdd382d9e1977964fa1fe6363991 (diff)
Merge branch 'release/skytools_3_1_5'skytools_3_1_5
Diffstat (limited to 'python/pgq/event.py')
-rw-r--r--python/pgq/event.py28
1 files changed, 1 insertions, 27 deletions
diff --git a/python/pgq/event.py b/python/pgq/event.py
index b083ba63..22e648a1 100644
--- a/python/pgq/event.py
+++ b/python/pgq/event.py
@@ -2,12 +2,7 @@
"""PgQ event container.
"""
-__all__ = ['EV_UNTAGGED', 'EV_RETRY', 'EV_DONE', 'Event', 'RetriableEvent']
-
-# Event status codes
-EV_UNTAGGED = -1
-EV_RETRY = 0
-EV_DONE = 1
+__all__ = ['Event']
_fldmap = {
'ev_id': 'ev_id',
@@ -67,24 +62,3 @@ class Event(object):
return "<id=%d type=%s data=%s e1=%s e2=%s e3=%s e4=%s>" % (
self.id, self.type, self.data, self.extra1, self.extra2, self.extra3, self.extra4)
-class RetriableEvent(Event):
- """Event which can be retryed
-
- Consumer is supposed to tag them after processing.
- """
-
- __slots__ = ('_status', )
-
- def __init__(self, queue_name, row):
- super(RetriableEvent, self).__init__(self, queue_name, row)
- self._status = EV_DONE
-
- def tag_done(self):
- self._status = EV_DONE
-
- def get_status(self):
- return self._status
-
- def tag_retry(self, retry_time = 60):
- self._status = EV_RETRY
- self.retry_time = retry_time