Removed dependency from kombu.five
Replaced with usage of simple time.time() Change-Id: I6a8f426f260937efb2fad29f354689dea79269c4 Closes-bug: #1305784
This commit is contained in:
parent
e02166f355
commit
8490ff823c
|
@ -151,7 +151,6 @@ class MuranoAgent(service.Service):
|
|||
except ValueError:
|
||||
log.warn('Execution result is not produced')
|
||||
|
||||
|
||||
def _verify_plan(self, plan):
|
||||
plan_format_version = plan.get('FormatVersion', '1.0.0')
|
||||
if semver.compare(plan_format_version, '2.0.0') > 0 or \
|
||||
|
|
|
@ -32,7 +32,7 @@ class Message(object):
|
|||
try:
|
||||
if message_handle:
|
||||
self.body = anyjson.loads(message_handle.body)
|
||||
else
|
||||
else:
|
||||
self.body = None
|
||||
except ValueError as e:
|
||||
self.body = None
|
||||
|
|
|
@ -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 . 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):
|
||||
|
|
Loading…
Reference in New Issue