weltlink/django-quickbooks

queue_manager.py _get_connection failing

Closed this issue · 0 comments

For some reason pika's BlockingConnection is just getting stuck. Not sure if I need to do anything to the rabbitmq settings? I followed the documentation and trying to simply add a customer.

This function inside of queue manager fails.

    def _get_connection(self) -> BlockingConnection:
        if hasattr(self, '_connection') and self._connection and self._connection.is_open:
            return self._connection
        self._connection = BlockingConnection(
            ConnectionParameters(
                host=qbwc_settings.RABBITMQ_DEFAULT_HOST,
                virtual_host=qbwc_settings.RABBITMQ_DEFAULT_VHOST,
                credentials=PlainCredentials(
                    username=qbwc_settings.RABBITMQ_DEFAULT_USER,
                    password=qbwc_settings.RABBITMQ_DEFAULT_PASS
                ),
                heartbeat=600,
                blocked_connection_timeout=300,
                connection_attempts=1000,
            )
        )

        return self._connection