agoragames / haigha

AMQP Python client
BSD 3-Clause "New" or "Revised" License
160 stars 41 forks source link

Don't print exceptions for each connection on windows machines #93

Closed 3ddi closed 6 years ago

3ddi commented 8 years ago

On windows machines the socket always fails to connect ::1 (IPv6 localhost format). socket_transport.connect.54: Failed to connect to ('::1', 5672, 0, 0): Traceback (most recent call last): File "C:\Python27\lib\site-packages\haigha\transports\socket_transport.py", line 48, in connect self._sock.connect(sockaddr) File "C:\Python27\lib\site-packages\gevent\_socket2.py", line 228, in connect raise error(err, strerror(err)) error: [Errno 10061] [Error 10061] No connection could be made because the target machine actively refused it.

As we are throwing an exception at the end of the loop, I believe that single failures should be logged only as a warning.

vitaly-krugl commented 8 years ago

@3ddi, the only way to ensure that a project stays compatible with a platform is to test it on that platform as part of that project's continuous integration process. Otherwise, there is no hope. I recently added Windows testing in pika via AppVeyor (similar concept to Travis-ci), which is free for Open-Source projects. You might try doing the same here for the Haigha client. It's pretty straight-forward. See https://github.com/pika/pika/blob/master/appveyor.yml. If @awestendorf accepts this integration, he would need to go through a very quick and simple sign-on process at http://www.appveyor.com/ to link up the AppVeyor service and this repo.