Cron.yaml doesn't route requests to proper module on dev server

*爱你&永不变心* 提交于 2020-02-06 05:25:06

问题


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

I loaded my two modules to my dev server with:

$ dev_appserver.py app.yaml updater.yaml 

Any ideas? Thanks.

Edit:

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:

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.

回答1:


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.

I use cron.yaml with a target module in production right now. There is no dispatch.yaml entry for that module.



来源:https://stackoverflow.com/questions/22924934/cron-yaml-doesnt-route-requests-to-proper-module-on-dev-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!