2

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 !

templatetypedef
  • 362,284
  • 104
  • 897
  • 1,065
Han Jubel
  • 153
  • 1
  • 1
  • 5
  • This question should be closed, this is an extremely old question that the author probably has moved on from. This error is a [very generic error](https://github.com/codeinthehole/django-cacheback/blob/45d37763121ef19ea3a35ef04097dacb3fb56cc2/cacheback/base.py#L341), and this question cannot be answered in its current form without the full stack trace. – Lie Ryan Jun 25 '23 at 01:50

0 Answers0