Celery,Django..制作任务/线程启动子任务/线程?
我正在将 celery 与 django 一起使用,并尝试获取一个任务,如下所示:
class task1 (Task)
def run (self):
launch_some_other_task.delay()
但它似乎不起作用,我可以详细了解我的代码,但我想我会先问是否这某种事情会起作用,但似乎对我不起作用。我发现这是必要的,因为我正在使用 selenium,一个网络测试框架,有时它会挂在我无法从中获得任何输出的地方,所以我希望能够在不满足某个条件时杀死 if off (在指定秒数内用特定值更新内存缓存变量)。
感谢您对此的任何建议
I'm using celery with django and am trying to get a Task, like the one below:
class 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保您已将以下内容添加到
urls.py
中:Make sure you've added the following to your
urls.py
: