MCPcopy
hub / github.com/pika/pika / flow

Method flow

pika/channel.py:802–821  ·  view source on GitHub ↗

Turn Channel flow control off and on. Pass a callback to be notified of the response from the server. active is a bool. Callback should expect a bool in response indicating channel flow state. For more information, please reference: https://www.rabbitmq.com/amqp-0-9-

(self,
             active: bool,
             callback: Optional[_OnFlowCallback] = None)

Source from the content-addressed store, hash-verified

800 [spec.Exchange.UnbindOk] if not nowait else [])
801
802 def flow(self,
803 active: bool,
804 callback: Optional[_OnFlowCallback] = None) -> None:
805 """Turn Channel flow control off and on. Pass a callback to be notified
806 of the response from the server. active is a bool. Callback should
807 expect a bool in response indicating channel flow state. For more
808 information, please reference:
809
810 https://www.rabbitmq.com/amqp-0-9-1-reference.html#channel.flow
811
812 :param bool active: Turn flow on or off
813 :param callable callback: callback(bool) upon completion
814 :raises ValueError:
815
816 """
817 self._raise_if_not_open()
818 validators.rpc_completion_callback(callback)
819 self._on_flowok_callback = callback
820 self._rpc(spec.Channel.Flow(active), self._on_flowok,
821 [spec.Channel.FlowOk])
822
823 @property
824 def is_closed(self) -> bool:

Callers 5

testMethod · 0.45

Calls 2

_raise_if_not_openMethod · 0.95
_rpcMethod · 0.95

Tested by 5

testMethod · 0.36