Cron.yaml不会将请求路由到dev服务器上的正确模块 [英] Cron.yaml doesn't route requests to proper module on dev server
问题描述
我使用GAE 1.9.2 - 我有一个cron.yaml文件,具有特定的请求,我想路由到一个名为updater.yaml的模块。在我的cron.yaml文件中我有:
I'm using GAE 1.9.2 -- I have a cron.yaml file with a specific request I want routed to a module called updater.yaml. In my cron.yaml file I have:
cron:
- description: Daily updater
url: /update
schedule: every day 02:00
timezone: America/New_York
target: updater
我把我的两个模块加载到我的dev服务器:
I loaded my two modules to my dev server with:
$ dev_appserver.py app.yaml updater.yaml
任何想法?感谢。
编辑:
updater.yaml的相关部分: p>
Relevant part of updater.yaml:
application: [my app name]
module: updater
version: one
runtime: python27
api_version: 1
threadsafe: true
instance_class: B4_1G
basic_scaling:
max_instances: 1
handlers:
- url: /update
script: downloader.application
login: admin
Edit 2 :
我的应用程序托管在google时出现此错误(即我的dev_server上没有运行),所以似乎一个处理程序不是正确设置...?:
I get this error on my app when hosted on google (i.e. not running on my dev_server) so it seems a handler isn't getting setup correctly...?:
W 2014-04-08 02:00:02.687 No handlers matched this URL.
推荐答案
从错误消息,它看起来像updater模块没有正确地映射处理程序。确保您可以在浏览器中手动调用/ update url,并获得正确的日志输出。
From your error message, it looks like the updater module doesn't have the handler mapped correctly. Make sure you can call the /update url manually in the browser and that you get the correct log output.
我现在使用cron.yaml和目标模块。该模块没有dispatch.yaml条目。
I use cron.yaml with a target module in production right now. There is no dispatch.yaml entry for that module.
这篇关于Cron.yaml不会将请求路由到dev服务器上的正确模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!