【发布时间】:2016-05-11 03:51:18
【问题描述】:
我正在将现有的 Python GAE(Google App Engine)标准环境应用程序迁移到柔性环境。我通读了guide 并决定尝试python-compact 运行时,因为尽可能多地重用代码总是好的。
在标准环境应用程序中,我们使用 background_thread.start_new_background_thread() 来生成一堆无限循环线程来永远处理一些后台工作。但是,即使对于一些非常简单的应用程序,我也无法让 start_new_background_thread 在灵活的环境中工作。喜欢这个示例应用程序: github.com/GoogleCloudPlatform/python-docs-samples/tree/master/appengine/background
在云中运行应用程序时,我不断收到以下error(虽然它在本地运行良好)。
我使用云调试器对其进行了调试,但是在 background_thread.py 中引发异常时根本没有任何错误消息
知道如何使用 python-compact 运行时在灵活的环境中运行长寿命的后台线程吗?谢谢!
【问题讨论】:
标签: python google-app-engine background-thread app-engine-flexible