启动和停止 Google App Engine 后端
我阅读了 Google App Engine 后端文档,但我仍然无法理解如何从 Python 启动/停止后端(动态后端)(我猜是使用 URLFetch)。
有人能给我一个代码示例吗?后端不会使用应用程序的默认版本。
I read the Google App Engine backend docs, but I still can't understand how to start/stop backends (dynamic backends) from Python (using URLFetch, I guess).
Could someone give me a code example? The backend will not be on the application's default version.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这取决于您使用的后端类型,“常驻后端”只能通过管理控制台或命令行从生产环境中关闭,而“动态后端”会在闲置几分钟后关闭。
因此,如果您使用动态后端,您只需发送一个请求,告诉它停止正在执行的操作,它就会自动关闭。
http://code.google.com/intl /iw/appengine/docs/python/config/backends.html#Types_of_Backends
编辑
其工作原理示例:
要停止它,您可以 使用:
It depends on what type of backend you are using, "Resident Backends" can't be shutdown from the production environment only via the Admin Console or command-line while "Dynamic Backends" are shutdown after sitting idle for a few minutes.
So if you use Dynamic Backends you can just send a request telling it to stop what it is doing and it will be shutdown automatically.
http://code.google.com/intl/iw/appengine/docs/python/config/backends.html#Types_of_Backends
Edit
Example of how this might work:
And to stop it you would use:
使用
appcfg
启动和停止后端。来自文档:Use
appcfg
to start and stop backends. From the documentation: