collective / collective.taskqueue

Asyncore-based asynchronous task queue for Plone
https://pypi.org/project/collective.taskqueue
8 stars 7 forks source link

Connection failure when not using unix_socket_path #8

Closed djay closed 10 years ago

djay commented 10 years ago

Looks like default for unix_socket_path is wrong.

Traceback (most recent call last):
  File "/Users/dylanjay/Projects/download-cache/eggs/Zope2-2.13.15-py2.7.egg/Zope2/Startup/run.py", line 76, in <module>
    run()
  File "/Users/dylanjay/Projects/download-cache/eggs/Zope2-2.13.15-py2.7.egg/Zope2/Startup/run.py", line 22, in run
    starter.prepare()
  File "/Users/dylanjay/Projects/download-cache/eggs/Zope2-2.13.15-py2.7.egg/Zope2/Startup/__init__.py", line 79, in prepare
    self.setupServers()
  File "/Users/dylanjay/Projects/download-cache/eggs/Zope2-2.13.15-py2.7.egg/Zope2/Startup/__init__.py", line 208, in setupServers
    servers.append(server.create())
  File "/Users/dylanjay/Projects/download-cache/eggs/collective.taskqueue-0.4.3-py2.7.egg/collective/taskqueue/datatypes.py", line 52, in create
    task_queue = klass(**self.kwargs)
  File "/Users/dylanjay/Projects/download-cache/eggs/collective.taskqueue-0.4.3-py2.7.egg/collective/taskqueue/redisqueue.py", line 33, in __init__
    self.redis.ping()  # Ensure Zope startup to crash when Redis down
  File "/Users/dylanjay/Projects/download-cache/eggs/redis-2.8.0-py2.7.egg/redis/client.py", line 497, in ping
    return self.execute_command('PING')
  File "/Users/dylanjay/Projects/download-cache/eggs/redis-2.8.0-py2.7.egg/redis/client.py", line 397, in execute_command
    connection.send_command(*args)
  File "/Users/dylanjay/Projects/download-cache/eggs/redis-2.8.0-py2.7.egg/redis/connection.py", line 306, in send_command
    self.send_packed_command(self.pack_command(*args))
  File "/Users/dylanjay/Projects/download-cache/eggs/redis-2.8.0-py2.7.egg/redis/connection.py", line 288, in send_packed_command
    self.connect()
  File "/Users/dylanjay/Projects/download-cache/eggs/redis-2.8.0-py2.7.egg/redis/connection.py", line 235, in connect
    raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 2 connecting to unix socket: default. No such file or directory.

I think the way you're doing the tests isn't surfacing these kind of configuration errors. For example would it better to have two travis buildout options, with and without redis? And different builds with and without using unix_socket_path

datakurre commented 10 years ago

@djay Agreed. I should set up matrix with and without redis.