在Google App Engine开发服务器(Python)上自动执行任务

在Google App Engine开发服务器(Python)上自动执行任务

问题描述:

python开发服务器的文档说明了有关运行任务的信息:

The docs for the python dev server say this about running tasks:

当您的应用在 开发服务器,任务队列是 不会自动处理.反而, 任务队列会产生您可以执行的任务 从开发人员检查并执行 控制台...

When your app is running in the development server, task queues are not processed automatically. Instead, task queues accrue tasks which you can examine and execute from the developer console...

但是python sdk(我正在使用)1.3.4版的发行说明说:

But the release notes for version 1.3.4 of the python sdk (which I am using) say:

现在已在中启用自动任务执行 dev_appserver.要关闭此功能 使用标志--disable_task_running.

Auto task execution is now enabled in the dev_appserver. To turn this off use the flag --disable_task_running.

所以文档可能会落后一些,对吧?除非我进入" http://localhost:8080/_ah/admin/tasks? queue = default ",我看到了:

So maybe the docs are a little behind, right? Except when I go to "http://localhost:8080/_ah/admin/tasks?queue=default", I see this:

任务将不会自动运行.按下运行"按钮以执行每个任务.

Tasks will not run automatically. Push the 'Run' button to execute each task.

任务是否可以自动运行?如果是这样,诀窍是什么?

Can tasks be run automatically or not? If so, what is the trick?

似乎问题是我在运行开发服务器时使用的是python 2.6而不是2.5.使用2.5时,一切正常.

It seems the problem was that I was running the dev server with python 2.6 instead of 2.5. When using 2.5, everything worked.