Google App Engine、Web2Py 和 Cron,无法为 url 错误的属性赋值
Google App Engine, Web2Py, and Cron, unable to assign value to attribute for url error
我在为我的 Web2Py 应用程序创建 Google App Engine Cron 任务时遇到了一些问题。我查看了 GAE Cron 的说明,这是我作为测试创建的任务:
我的 cron.yaml 文件与我的 app.yaml 在同一目录中,
我的 python 控制器的路径是 applications/data/default,并且
url 访问函数是 myapp.appspot.com/data/default/test。
这是我的cron任务入口:
cron:
- description: test
url: data/default/test
schedule: every 2 minutes synchronized
但是,我在尝试部署时遇到此错误:
Unable to assign value 'data/default/test' to attribute 'url':
Value 'data/default/test' for url does not match expression '^(?:^/.*$)$'
这是我的 app.yaml 文件的处理程序部分:
handlers:
# Warning! Static mapping - below - isn't compatible with
# the parametric router's language logic.
# You cannot use them together.
- url: /(.+?)/static/_(\d+\.\d+\.\d+)\/(.+)
static_files: applications//static/
upload: applications/(.+?)/static/(.+)
secure: optional
expiration: "365d"
- url: /(.+?)/static/(.+)
static_files: applications//static/
upload: applications/(.+?)/static/(.+)
secure: optional
- url: /favicon.ico
static_files: applications/welcome/static/favicon.ico
upload: applications/welcome/static/favicon.ico
- url: /robots.txt
static_files: applications/welcome/static/robots.txt
upload: applications/welcome/static/robots.txt
- url: .*
script: gaehandler.wsgiapp # WSGI (Python 2.7 only)
secure: optional
我在这里很迷茫,因为我不太熟悉 google 应用程序引擎或 web2py。任何帮助将不胜感激
您的 cron.yaml url 规范中缺少斜杠:
cron:
- description: test
url: /data/default/test
schedule: every 2 minutes synchronized
我在为我的 Web2Py 应用程序创建 Google App Engine Cron 任务时遇到了一些问题。我查看了 GAE Cron 的说明,这是我作为测试创建的任务:
我的 cron.yaml 文件与我的 app.yaml 在同一目录中, 我的 python 控制器的路径是 applications/data/default,并且 url 访问函数是 myapp.appspot.com/data/default/test。
这是我的cron任务入口:
cron:
- description: test
url: data/default/test
schedule: every 2 minutes synchronized
但是,我在尝试部署时遇到此错误:
Unable to assign value 'data/default/test' to attribute 'url':
Value 'data/default/test' for url does not match expression '^(?:^/.*$)$'
这是我的 app.yaml 文件的处理程序部分:
handlers:
# Warning! Static mapping - below - isn't compatible with
# the parametric router's language logic.
# You cannot use them together.
- url: /(.+?)/static/_(\d+\.\d+\.\d+)\/(.+)
static_files: applications//static/
upload: applications/(.+?)/static/(.+)
secure: optional
expiration: "365d"
- url: /(.+?)/static/(.+)
static_files: applications//static/
upload: applications/(.+?)/static/(.+)
secure: optional
- url: /favicon.ico
static_files: applications/welcome/static/favicon.ico
upload: applications/welcome/static/favicon.ico
- url: /robots.txt
static_files: applications/welcome/static/robots.txt
upload: applications/welcome/static/robots.txt
- url: .*
script: gaehandler.wsgiapp # WSGI (Python 2.7 only)
secure: optional
我在这里很迷茫,因为我不太熟悉 google 应用程序引擎或 web2py。任何帮助将不胜感激
您的 cron.yaml url 规范中缺少斜杠:
cron:
- description: test
url: /data/default/test
schedule: every 2 minutes synchronized