weltlink / django-quickbooks

Django Integration with Quickbooks
Mozilla Public License 2.0
37 stars 13 forks source link

queue_manager.py _get_connection failing #17

Closed mccluret closed 3 years ago

mccluret commented 3 years ago

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