当前位置: 动力学知识库 > 问答 > 编程问答 >

python - NotRegistered with djcelery + Heroku

问题描述:

I've been stuck on this one for the last 6 hours or so. So any help would be greatly appreciated.

I am using djcelery on a Django app which is deployed on Heroku. Said app has a periodic task that works just fine.

Today, I brought up another Heroku App which is a clone of the previous one so we'll have a production environment. The new Heroku deployment doesn't run the periodic task, instead, I get this in the logs:

2013-01-09T15:35:11+00:00 app[celeryd.1]: [2013-01-09 15:35:11,252: ERROR/MainProcess] Task tasks.UpdateWowza[611aad8e-a1fc-4d6e-b6df-f09b9dcf8e41] raised exception: Task of kind 'tasks.UpdateWowza' is not registered, please make sure it's imported.

2013-01-09T15:35:11+00:00 app[celeryd.1]: Traceback (most recent call last):

2013-01-09T15:35:11+00:00 app[celeryd.1]: File "/app/.heroku/python/lib/python2.7/site-packages/billiard/pool.py", line 301, in worker

2013-01-09T15:35:11+00:00 app[celeryd.1]: result = (True, func(*args, **kwds))

2013-01-09T15:35:11+00:00 app[celeryd.1]: File "/app/.heroku/python/lib/python2.7/site-packages/celery/task/trace.py", line 312, in_fast_trace_task

2013-01-09T15:35:11+00:00 app[celeryd.1]: return _tasks[task].__trace__(uuid, args, kwargs, request)[0]

2013-01-09T15:35:11+00:00 app[celeryd.1]: File "/app/.heroku/python/lib/python2.7/site-packages/celery/app/registry.py", line 20, in __missing__

2013-01-09T15:35:11+00:00 app[celeryd.1]: raise self.NotRegistered(key)

2013-01-09T15:35:11+00:00 app[celeryd.1]: NotRegistered: 'tasks.UpdateWowza'

This is where I am stuck, the two deployments have the exact same code, same Heroku addons and same configuration.

In addition, djcelery's DB models are empty in both deployments.

What am I missing? Are there any other factors involved other than the ones above?

I even gave the periodic task an explicit name to make sure that's not the issue.

Any help would be greatly appreciated!

分享给朋友:
您可能感兴趣的文章:
随机阅读: