I've set CELERY_ALWAYS_EAGER = True
in the settings of django at test env.
But somehow I still got this message.
ERROR:cacheback:Unable to trigger task asynchronously - failing over to synchronous refresh
ERROR:cacheback:[Errno 111] Connection refused
actually the CELERY_ALWAYS_EAGER = True
works, This is what I got from django shell.
$ python manage.py shell
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from django.conf import settings
>>> from celery import Celery
>>> app = Celery()
>>> app.config_from_object('django.conf:settings')
>>> print app.conf.CELERY_ALWAYS_EAGER
True
>>> @app.task()
... def foo():
... print('FOO')
...
>>> print foo.delay()
FOO
4ff95b5c-f8bc-412b-ad19-602082aec1e9
>>>
It there have any idea why I still got the error messages ? Thank you very much !