我在我的 python 项目中使用 App Engine 模块。(https://developers.google.com/appengine/docs/python/modules/#Python_Background_threads)
我还在 m 项目中收到电子邮件: https ://developers.google.com/appengine/docs/python/mail/receivingmail
我想将电子邮件定向到我的工作模块而不是默认模块。为此,我的 worker.yaml 具有以下设置
工人.yaml
api_version: 1
application: integrate
module: worker
version: 1-0-0
runtime: python27
threadsafe: true
inbound_services:
- mail
builtins:
- deferred: on
handlers:
- url: /admin/.+
script: src.worker.main.app
login: admin
- url: /_ah/mail/.+
script: src.worker.main.app
login: admin
- url: /.*
script: src.worker.main.app
应用程序.yaml
api_version: 1
application: integrate
version: 1-0-0
runtime: python27
threadsafe: true
builtins:
- deferred: on
handlers:
- url: /admin/.+
script: src.default.main.app
login: admin
- url: /.*
script: src.default.main.app
我什至尝试添加一个 dispatch.yaml
application: integrate
dispatch:
- url: "*/_ah/mail/.+"
module: worker
但无论我做什么,到达我的应用程序的电子邮件都由默认模块处理。知道我在这里缺少什么吗?我看到电子邮件进来了,但无论我做什么,它们都只会转到默认模块。