尝试将cron作业路由到特定版本的模块时遇到问题。模块batcher包含cron.xml文件。在文件里面我有:
<cron>
<url>/_user/tags/deleteOld?page=0&pageSize=50</url>
<description>deletes user's old tags</description>
<schedule>every saturday 21:00</schedule>
<timezone>Europe/Helsinki</timezone>
<target>v4-dot-batcher</target>
</cron>
这样就行了,cron作业正确地路由到batcher模块版本v4。 现在,如果我尝试将此cron作业重定向到另一个名为mules的模块:
<cron>
<url>/_user/tags/deleteOld?page=0&pageSize=50</url>
<description>deletes user's old tags</description>
<schedule>every saturday 21:00</schedule>
<timezone>Europe/Helsinki</timezone>
<target>v4-dot-mules</target>
</cron>
这不再起作用,因为请求总是被发送到模块的默认版本(称为test)而不是v4。
是因为cron.xml在batcher模块中还是与dispatch.xml有关?我没有设置与route&#34; / _ user / tags / deleteOld&#34;相关的任何内容。在mules模块的dispatch.xml中。
查看日志,protoPayload包含:
protoPayload: {
@type: "type.googleapis.com/google.appengine.logging.v1.RequestLog"
versionId: "test"
startTime: "2017-05-29T16:45:00.628537Z"
endTime: "2017-05-29T16:45:00.642901Z"
latency: "0.014364s"
megaCycles: "11"
method: "GET"
resource: "/_user/tags/deleteOld?page=0&pageSize=50"
httpVersion: "HTTP/1.1"
status: 404
responseSize: "234"
userAgent: "AppEngine-Google; (+http://code.google.com/appengine)"
urlMapEntry: "unused"
host: "v4-dot-mules.testapp.appspot.com"
taskQueueName: "__cron"
finished: true
}
mules的v4配置如下:
runtime: java7
threadsafe: true
instance_class: F4
inbound_services:
- warmup
handlers:
- url: '/.*'
script: unused
secure: always
automatic_scaling:
min_idle_instances: automatic
max_idle_instances: 1
min_pending_latency: 5s
max_pending_latency: 15s
max_concurrent_requests: 10
有关于此的任何想法?非常感谢!