0

That's a small story...

I had this error:

AttributeError: 'DisabledBackend' object has no attribute '_get_task_meta_for'

When changed tasks.py, like Diederik said at Celery with RabbitMQ: AttributeError: 'DisabledBackend' object has no attribute '_get_task_meta_for'

app = Celery('tasks', backend='rpc://', broker='amqp://guest@localhost//')

ran it

>>> from tasks import add
>>> result = add.delay(4,50)
>>> result.ready()

got DisabledBackend again ... hmm what was that..

put code to file run.py and it returned True...

from tasks import add
try:
        result = add.delay(1,4)
        print (result.ready())
except:
        print "exept"

I see that if I call >>> from tasks import add after tasks.py changed, it doesn't get the updates... That behaviour is the same for ipython, so because of I can't understand the reason, I advice people to DEBUG from scripts like ~runthis.py

Will be glad for answer which will smash my idea...

Community
  • 1
  • 1
Riorita
  • 151
  • 2
  • 2
  • 12

1 Answers1

0

If using the interpreter, you need to

reload(tasks)

this will force reimport tasks module

Awalias
  • 2,027
  • 6
  • 31
  • 51
  • It detailed at http://stackoverflow.com/questions/2534480/proper-way-to-reload-a-python-module-from-the-console – Riorita Oct 12 '16 at 13:43