Merge "Remove envelope argument from driver send() interface"

This commit is contained in:
Jenkins
2017-08-27 15:19:34 +00:00
committed by Gerrit Code Review
2 changed files with 3 additions and 6 deletions

View File

@@ -361,7 +361,7 @@ class BaseDriver(object):
@abc.abstractmethod
def send(self, target, ctxt, message,
wait_for_reply=None, timeout=None, envelope=False, retry=None):
wait_for_reply=None, timeout=None, retry=None):
"""Send a message to the given target and optionally wait for a reply.
This method is used by the RPC client when sending RPC requests to a
server.

View File

@@ -266,8 +266,7 @@ class ProtonDriver(base.BaseDriver):
@_ensure_connect_called
def send(self, target, ctxt, message,
wait_for_reply=False, timeout=None, envelope=False,
retry=None):
wait_for_reply=False, timeout=None, retry=None):
"""Send a message to the given target.
:param target: destination for message
@@ -281,15 +280,13 @@ class ProtonDriver(base.BaseDriver):
:param timeout: raise exception if send does not complete within
timeout seconds. None == no timeout.
:type timeout: float
:param envelope: Encapsulate message in an envelope
:type envelope: bool
:param retry: (optional) maximum re-send attempts on recoverable error
None or -1 means to retry forever
0 means no retry
N means N retries
:type retry: int
"""
request = marshal_request(message, ctxt, envelope)
request = marshal_request(message, ctxt, envelope=False)
expire = 0
if timeout:
expire = compute_timeout(timeout) # when the caller times out