From f36d8bea5da78148c8ae06bd0b454e6c5a15dd98 Mon Sep 17 00:00:00 2001 From: Serg Melikyan Date: Thu, 10 Apr 2014 15:08:20 +0400 Subject: [PATCH] Removed dependency from kombu.five Replace usage of five.monotonic with simple time.time(). Closes-bug: #1305784 Change-Id: I138d034ef0677f8ecb73cb978860f8d0a0a4df4e --- muranoapi/common/messaging/subscription.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/muranoapi/common/messaging/subscription.py b/muranoapi/common/messaging/subscription.py index 640b387c..c0890a23 100644 --- a/muranoapi/common/messaging/subscription.py +++ b/muranoapi/common/messaging/subscription.py @@ -15,10 +15,10 @@ import collections import socket +import time from eventlet import patcher kombu = patcher.import_patched('kombu') -five = patcher.import_patched('kombu.five') from muranoapi.common.messaging import message @@ -51,14 +51,14 @@ class Subscription(object): elapsed = 0.0 remaining = timeout while True: - time_start = five.monotonic() + time_start = time.time() if self._buffer: return self._buffer.pop() try: self._connection.drain_events(timeout=timeout and remaining) except socket.timeout: return None - elapsed += five.monotonic() - time_start + elapsed += time.time() - time_start remaining = timeout and timeout - elapsed or None def _receive(self, message_data, message):