title: Setting up Celery with Redis on a server for a Django app
body: <p>I am trying to set up my django project to work with Celery and Redis. I have no issues running it locally, but I can't get it working in the production server.</p>
  
  <p>My hosting recommends to setup Redis using unixsocket and run redis in a screen:</p>
  
  <ul>
  <li>port 0</li>
  <li>unixsocket /path/redis.sock </li>
  </ul>
  
  <p>This all works, when I run redis I get:</p>
  
  <pre><code>* The server is now ready to accept connections at /here-comes-my-path/redis.sock
  </code></pre>
  
  <p>Now I have issues:</p>
  
  <ol>
  <li>How do I verify the connection? <code>redis-cli -p 0</code> returns 
  <code>Could not connect to Redis at 127.0.0.1:0: Can't assign requested address
  not connected&gt;</code></li>
  <li><p>How do I start celery worker? Running <code>celery -A rbwpredictor worker -l info</code> 
  returns (I've xed sensitive data):</p>
  
  <pre><code>Traceback (most recent call last):
  </code></pre>
  
  <p>File "/usr/home/xxxx/.virtualenvs/xxxx/bin/celery", line 6, in 
      from celery.<strong>main</strong> import main
    File "/home/xxx/domains/xxxx/public_python/xxxx/celery.py", line 6, in 
      from celery import Celery
  ImportError: cannot import name 'Celery'</p></li>
  </ol>
  
  <p>My Celery settings in settings.py:</p>
  
  <pre><code>CELERY_RESULT_BACKEND = 'django-db'
  CELERY_STATUS_PENDING = 'PENDING'
  CELERY_STATUS_STARTED = 'STARTED'
  CELERY_STATUS_RETRY = 'RETRY'
  CELERY_STATUS_FAILURE = 'FAILURE'
  CELERY_STATUS_SUCCESS = 'SUCCESS'
  </code></pre>
  
  <p>As mentioned above locally everything works fine, it's the configuration on the server I struggle with.</p>