Skip to content
Snippets Groups Projects
Commit 23cfb8ad authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

go timestamp them yourself

parent 17726db5
No related branches found
No related tags found
No related merge requests found
...@@ -19,20 +19,12 @@ class Event(object): ...@@ -19,20 +19,12 @@ class Event(object):
An event emitted by Cluster An event emitted by Cluster
""" """
class Timestamped(Event):
"""
Notes the time of the event (as result of .monotonic)
"""
def __init__(self):
super(Timestamped, self).__init__()
self.ts = monotonic.monotonic()
class NothingMuch(Event): class NothingMuch(Event):
"""Nothing happened :D""" """Nothing happened :D"""
class ConnectionLost(Timestamped): class ConnectionLost(Event):
""" """
We have lost the connection. We have lost the connection.
...@@ -45,7 +37,7 @@ class ConnectionLost(Timestamped): ...@@ -45,7 +37,7 @@ class ConnectionLost(Timestamped):
""" """
class MessageReceived(ReceivedMessage, Timestamped): class MessageReceived(ReceivedMessage, Event):
""" """
Something that works as an ersatz ReceivedMessage, but is an event Something that works as an ersatz ReceivedMessage, but is an event
""" """
...@@ -54,4 +46,3 @@ class MessageReceived(ReceivedMessage, Timestamped): ...@@ -54,4 +46,3 @@ class MessageReceived(ReceivedMessage, Timestamped):
ReceivedMessage.__init__(self, msg.body, msg.exchange_name, msg.routing_key, ReceivedMessage.__init__(self, msg.body, msg.exchange_name, msg.routing_key,
properties=msg.properties, delivery_tag=msg.delivery_tag, properties=msg.properties, delivery_tag=msg.delivery_tag,
ack=msg.ack, nack=msg.nack) ack=msg.ack, nack=msg.nack)
Timestamped.__init__(self)
...@@ -5,7 +5,7 @@ from setuptools import setup ...@@ -5,7 +5,7 @@ from setuptools import setup
setup(name=u'CoolAMQP', setup(name=u'CoolAMQP',
version='0.89', version='0.89',
description=u'The fastest AMQP client', description=u'Very fast pure-Python AMQP client',
author=u'DMS Serwis s.c.', author=u'DMS Serwis s.c.',
author_email=u'piotrm@smok.co', author_email=u'piotrm@smok.co',
url=u'https://github.com/smok-serwis/coolamqp', url=u'https://github.com/smok-serwis/coolamqp',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment