mirror of https://github.com/celery/kombu.git
flakes
This commit is contained in:
parent
87a5568bc8
commit
2358f990d5
|
@ -59,7 +59,8 @@ class Request(object):
|
|||
use_gzip (bool): Allow the server to use gzip compression.
|
||||
Enabled by default.
|
||||
validate_cert (bool): Set to true if the server certificate should be
|
||||
verified when performing ``https://`` requests (enabled by default).
|
||||
verified when performing ``https://`` requests.
|
||||
Enabled by default.
|
||||
auth_username (str): Username for HTTP authentication.
|
||||
auth_password (str): Password for HTTP authentication.
|
||||
auth_mode (str): Type of HTTP authentication (``basic`` or ``digest``).
|
||||
|
|
|
@ -206,7 +206,8 @@ def send_reply(exchange, req, msg,
|
|||
req (~kombu.Message): Original request, a message with
|
||||
a ``reply_to`` property.
|
||||
producer (kombu.Producer): Producer instance
|
||||
retry (bool): If true must retry according to ``reply_policy`` argument.
|
||||
retry (bool): If true must retry according to
|
||||
the ``reply_policy`` argument.
|
||||
retry_policy (Dict): Retry settings.
|
||||
**props (Any): Extra properties.
|
||||
"""
|
||||
|
|
|
@ -77,8 +77,9 @@ class Connection(object):
|
|||
pass to alternate kombu channel implementations. Consult the
|
||||
transport documentation for available options.
|
||||
heartbeat (float): Heartbeat interval in int/float seconds.
|
||||
Note that if heartbeats are enabled then the :meth:`heartbeat_check`
|
||||
method must be called regularly, around once per second.
|
||||
Note that if heartbeats are enabled then the
|
||||
:meth:`heartbeat_check` method must be called regularly,
|
||||
around once per second.
|
||||
|
||||
Note:
|
||||
The connection is established lazily when needed. If you need the
|
||||
|
@ -420,7 +421,8 @@ class Connection(object):
|
|||
If this limit is exceeded the connection error
|
||||
will be re-raised.
|
||||
|
||||
interval_start (float): The number of seconds we start sleeping for.
|
||||
interval_start (float): The number of seconds we start
|
||||
sleeping for.
|
||||
interval_step (float): How many seconds added to the interval
|
||||
for each retry.
|
||||
interval_max (float): Maximum number of seconds to sleep between
|
||||
|
@ -501,7 +503,8 @@ class Connection(object):
|
|||
Example:
|
||||
>>> channel = connection.channel()
|
||||
>>> try:
|
||||
... ret, channel = connection.autoretry(publish_messages, channel)
|
||||
... ret, channel = connection.autoretry(
|
||||
... publish_messages, channel)
|
||||
... finally:
|
||||
... channel.close()
|
||||
"""
|
||||
|
|
|
@ -67,29 +67,30 @@ class Exchange(MaybeChannelBound):
|
|||
|
||||
* `direct` (*default*)
|
||||
|
||||
Direct match between the routing key in the message, and the
|
||||
routing criteria used when a queue is bound to this exchange.
|
||||
Direct match between the routing key in the message,
|
||||
and the routing criteria used when a queue is bound to
|
||||
this exchange.
|
||||
|
||||
* `topic`
|
||||
|
||||
Wildcard match between the routing key and the routing pattern
|
||||
specified in the exchange/queue binding. The routing key is
|
||||
treated as zero or more words delimited by `"."` and
|
||||
supports special wildcard characters. `"*"` matches a
|
||||
single word and `"#"` matches zero or more words.
|
||||
Wildcard match between the routing key and the routing
|
||||
pattern specified in the exchange/queue binding.
|
||||
The routing key is treated as zero or more words delimited
|
||||
by `"."` and supports special wildcard characters. `"*"`
|
||||
matches a single word and `"#"` matches zero or more words.
|
||||
|
||||
* `fanout`
|
||||
|
||||
Queues are bound to this exchange with no arguments. Hence any
|
||||
message sent to this exchange will be forwarded to all queues
|
||||
bound to this exchange.
|
||||
Queues are bound to this exchange with no arguments. Hence
|
||||
any message sent to this exchange will be forwarded to all
|
||||
queues bound to this exchange.
|
||||
|
||||
* `headers`
|
||||
|
||||
Queues are bound to this exchange with a table of arguments
|
||||
containing headers and values (optional). A special argument
|
||||
named "x-match" determines the matching algorithm, where
|
||||
`"all"` implies an `AND` (all pairs must match) and
|
||||
containing headers and values (optional). A special
|
||||
argument named "x-match" determines the matching algorithm,
|
||||
where `"all"` implies an `AND` (all pairs must match) and
|
||||
`"any"` implies `OR` (at least one pair must match).
|
||||
|
||||
:attr:`arguments` is used to specify the arguments.
|
||||
|
@ -636,12 +637,13 @@ class Queue(MaybeChannelBound):
|
|||
"""
|
||||
if no_ack is None:
|
||||
no_ack = self.no_ack
|
||||
return self.channel.basic_consume(queue=self.name,
|
||||
no_ack=no_ack,
|
||||
consumer_tag=consumer_tag or '',
|
||||
callback=callback,
|
||||
nowait=nowait,
|
||||
arguments=self.consumer_arguments)
|
||||
return self.channel.basic_consume(
|
||||
queue=self.name,
|
||||
no_ack=no_ack,
|
||||
consumer_tag=consumer_tag or '',
|
||||
callback=callback,
|
||||
nowait=nowait,
|
||||
arguments=self.consumer_arguments)
|
||||
|
||||
def cancel(self, consumer_tag):
|
||||
"""Cancel a consumer by consumer tag."""
|
||||
|
@ -650,13 +652,17 @@ class Queue(MaybeChannelBound):
|
|||
def delete(self, if_unused=False, if_empty=False, nowait=False):
|
||||
"""Delete the queue.
|
||||
|
||||
Example:
|
||||
.. code-block:: console
|
||||
$ foo = 'blah'
|
||||
|
||||
Arguments:
|
||||
if_unused (bool): If set, the server will only delete the queue
|
||||
if it has no consumers. A channel error will be raised
|
||||
if the queue has consumers.
|
||||
|
||||
if_empty (bool): If set, the server will only delete the queue
|
||||
if it is empty. If it is not empty a channel error will be raised.
|
||||
if_empty (bool): If set, the server will only delete the queue if
|
||||
it is empty. If it is not empty a channel error will be raised.
|
||||
|
||||
nowait (bool): Do not wait for a reply.
|
||||
"""
|
||||
|
|
|
@ -405,8 +405,8 @@ def enable_insecure_serializers(choices=['pickle', 'yaml', 'msgpack']):
|
|||
"""Enable serializers that are considered to be unsafe.
|
||||
|
||||
Note:
|
||||
Will enable ``pickle``, ``yaml`` and ``msgpack`` by default,
|
||||
but you can also specify a list of serializers (by name or content type)
|
||||
Will enable ``pickle``, ``yaml`` and ``msgpack`` by default, but you
|
||||
can also specify a list of serializers (by name or content type)
|
||||
to enable.
|
||||
"""
|
||||
for choice in choices:
|
||||
|
|
Loading…
Reference in New Issue