コード例 #1
0
ファイル: base_connection.py プロジェクト: Jonty/pika
    def __init__(self, parameters=None, on_open_callback=None, reconnection_strategy=None):

        # Let the developer know we could not import SSL
        if parameters.ssl and not SSL:
            raise Exception("SSL specified but it is not available")

        # Call our parent's __init__
        Connection.__init__(self, parameters, on_open_callback, reconnection_strategy)
コード例 #2
0
ファイル: base_connection.py プロジェクト: doubleukay/pika
    def __init__(self, parameters=None,
                       on_open_callback=None,
                       reconnection_strategy=None):

        # Let the developer know we could not import SSL
        if parameters.ssl and not SSL:
            raise Exception("SSL specified but it is not available")

        # Call our parent's __init__
        Connection.__init__(self, parameters, on_open_callback,
                            reconnection_strategy)
コード例 #3
0
    def acknowledge_message(self, channel: Channel, delivery_tag: str,
                            connection: Connection):
        """
        Acknowledge message and move onto the next. All of the required
        params come from the message callback params.

        :param channel: callback channel param
        :param delivery_tag: from the callback method param. eg. method.delivery_tag
        :param connection: connection object from the callback param
        """
        cb = functools.partial(self._acknowledge_message, channel,
                               delivery_tag)
        connection.add_callback_threadsafe(cb)
コード例 #4
0
ファイル: base_connection.py プロジェクト: colprog/pika
    def _init_connection_state(self):
        Connection._init_connection_state(self)

        # Set our defaults
        self.fd = None
        self.ioloop = None

        # Event states (base and current)
        self.base_events = READ | ERROR
        self.event_state = self.base_events
        self.socket = None
        self.write_buffer = None
        self._ssl_connecting = False
        self._ssl_handshake = False
コード例 #5
0
ファイル: base_connection.py プロジェクト: doubleukay/pika
    def _init_connection_state(self):
        Connection._init_connection_state(self)

        # Set our defaults
        self.fd = None
        self.ioloop = None

        # Event states (base and current)
        self.base_events = READ | ERROR
        self.event_state = self.base_events
        self.socket = None
        self.write_buffer = None
        self._ssl_connecting = False
        self._ssl_handshake = False
コード例 #6
0
ファイル: base_connection.py プロジェクト: bkjones/pika
    def __init__(self, parameters=None, on_open_callback=None,
                 reconnection_strategy=None):
        # Set our defaults
        self.fd = None
        self.ioloop = None
        self.socket = None

        # Event states (base and current)
        self.base_events = READ | ERROR
        self.event_state = self.base_events

        # Call our parent's __init__
        Connection.__init__(self, parameters, on_open_callback,
                            reconnection_strategy)
コード例 #7
0
ファイル: base_connection.py プロジェクト: daasara/riba
    def __init__(self,
                 parameters=None,
                 on_open_callback=None,
                 reconnection_strategy=None):
        # Set our defaults
        self.fd = None
        self.ioloop = None
        self.socket = None

        # Event states (base and current)
        self.base_events = READ | ERROR
        self.event_state = self.base_events

        # Call our parent's __init__
        Connection.__init__(self, parameters, on_open_callback,
                            reconnection_strategy)
コード例 #8
0
    def __init__(self, parameters=None,
                       on_open_callback=None,
                       reconnection_strategy=None):

        # Let the developer know we could not import SSL
        if parameters.ssl and not SSL:
            raise Exception("SSL specified but it is not available")

        # Set our defaults
        self.fd = None
        self.ioloop = None
        self.socket = None

        # Event states (base and current)
        self.base_events = READ | ERROR
        self.event_state = self.base_events

        # Call our parent's __init__
        Connection.__init__(self, parameters, on_open_callback,
                            reconnection_strategy)