开发者

Celery, Django.. making a Task / thread launch sub-task / threads?

I'm using celery with django and am trying to get a Task, like the one below:

class开发者_JAVA百科 task1 (Task)
   def run (self):
      launch_some_other_task.delay()

But it doesn't seem to be working, I can go into more detail as far as my code but figured I would just ask first if this sort of thing will work as doesn't seem to be working for me. I am finding this necessary as I am using selenium, a web testing framework, where sometimes it will just hang where I can't get any output from this so I want to be able to kill if off if a certain condition isn't met (updating a memcache variable with a certain value within a specified number of seconds).

Thanks for any advice on this


Make sure you've added the following to your urls.py:

import djcelery
djcelery.setup_loader()
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜