I am trying to convert an AppEngine application, which used a backend into one using an module (as recommended by Google).
I converted the backends.yaml with backends_conversion.py app.yaml backends.yaml
During appcfg.py update producer.yaml
I than received the error, that the version "producer" already existed and that I should change the module name.
I didn't do that (because I use the module name as an taskqueue target). Instead I stopped and deleted the running backend version.
Upload the module worked afterwards.
But queuing task (via taskqueue) does not work (ie no instance of the module is started).
Also trying to address the module from the browser (producer.appid.appspot.com) prduces an http 503.
What's wrong?
[Update] We are adressing the backend explicitly:
taksqueue.add(..., target='producer')
The taskqueue documentation does not say how to do that with modules.
[Update] producer.yaml
admin_console:
pages:
- name: Initialize
url: /init
api_version: '1'
application: lpsng2
basic_scaling:
max_instances: '1'
builtins:
- remote_api: 'on'
default_expiration: 8d
env_variables:
TMP: C:\temp
handlers:
- login: admin
mime_type: image/vnd.microsoft.icon,
secure: optional
static_files: static/favicon.ico
upload: static/favicon.ico
url: /favicon.ico
- login: admin
mime_type: image/png
secure: optional
static_files: static/images/lpsng_icon_os_144.png
upload: static/images/lpsng_icon_os_144.png
url: /apple-touch-icon-precomposed.png
- login: admin
mime_type: application/x-chrome-extension
secure: optional
static_files: static/lpsng.crx
upload: static/lpsng.crx
url: /static/lpsng.crx
- http_headers:
Vary: Accept-Encoding
login: admin
mime_type: image/png
secure: optional
static_files: static/\1.png
upload: static/(.*).png
url: /static/(.*).png
- http_headers:
Vary: Accept-Encoding
login: admin
mime_type: image/jpeg
secure: optional
static_files: static/\1.jpg
upload: static/(.*).jpg
url: /static/(.*).jpg
- http_headers:
Vary: Accept-Encoding
login: admin
secure: optional
static_dir: static
url: /static
- http_headers:
Vary: Accept-Encoding
login: admin
secure: optional
static_files: source/lib/ace/lib/\2
upload: source/lib/ace/lib/(.*)
url: /js/(.*)/lib/ace/lib/(.*)
- http_headers:
Vary: Accept-Encoding
login: admin
secure: optional
static_files: source/lib/ace/css/\2
upload: source/lib/ace/css/(.*)
url: /js/(.*)/lib/ace/css/(.*)
- http_headers:
Vary: Accept-Encoding
login: admin
secure: optional
static_files: source/lib/ace/mode/\2
upload: source/lib/ace/mode/(.*)
url: /js/(.*)/lib/ace/mode/(.*)
- http_headers:
Vary: Accept-Encoding
login: admin
secure: optional
static_files: source/lib/ace/mode/json/\2
upload: source/lib/ace/mode/json/(.*)
url: /js/(.*)/lib/ace/mode/json/(.*)
- http_headers:
Vary: Accept-Encoding
login: admin
secure: optional
static_files: source/lib/ace/mode/python/\2
upload: source/lib/ace/mode/python/(.*)
url: /js/(.*)/lib/ace/mode/python/(.*)
- http_headers:
Vary: Accept-Encoding
login: admin
secure: optional
static_files: source/lib/ace/theme/\2
upload: source/lib/ace/theme/(.*)
url: /js/(.*)/lib/ace/theme/(.*)
- http_headers:
Vary: Accept-Encoding
login: admin
secure: optional
static_files: source/lib/ace/worker/\2
upload: source/lib/ace/worker/(.*)
url: /js/(.*)/lib/ace/worker/(.*)
- http_headers:
Vary: Accept-Encoding
login: admin
secure: optional
static_files: source/lib/ace/\2
upload: source/lib/ace/(.*)
url: /js/(.*)/lib/ace/(.*)
- http_headers:
Vary: Accept-Encoding
login: admin
secure: optional
static_files: source/lib/ace/\2/\3/\4
upload: source/lib/ace/(.*)/(.*) /(.*)
url: /js/(.*)/lib/ace/(.*)/(.*)/(.*)
- http_headers:
Vary: Accept-Encoding
login: admin
secure: optional
static_files: buildout/\2
upload: buildout/(.*)
url: /js/(.*)/(.*)
- http_headers:
Vary: Accept-Encoding
login: admin
secure: optional
static_files: buildcss/\1
upload: buildcss/(.*)
url: /css/(.*)
- http_headers:
Vary: Accept-Encoding
login: admin
secure: optional
static_files: source/\2/\3
upload: dummy/dummy.txt
url: /source/(.*)/(.*)/(.*)
- http_headers:
Vary: Accept-Encoding
login: admin
secure: optional
static_files: source/\2
upload: dummy/dummy.txt
url: /source/(.*)/(.*)
- script: main.app
secure: optional
url: .*
inbound_services:
- xmpp_message
instance_class: B8
libraries:
- name: webapp2
version: 2.5.2
- name: markupsafe
version: '0.15'
- name: jinja2
version: '2.6'
- name: PIL
version: 1.1.7
module: producer
runtime: python27
skip_files: (?:^(.*/)?app\.yaml)|(?:^(.*/)?app\.yml)|(?:^(.*/)?index\.yaml)|(?:^(.*/)?index\.yml)|(?:^(.*/)?#.*#)|(?:^(.*/)?.*~)|(?:^(.*/)?.*\.py[co])|(?:^(.*/)?.*/RCS/.*)|(?:^(.*/)?\..*)|(?:^dev/(.*))|(?:^build/(.*))|(?:(.*/source/.*))|(?:^source1/lib/([^\/]*)$)|(?:^dist/(.*)$)|(?:^data/blob/(.*))|(?:^data/log/(.*))|(?:^data/temp/(.*))|(?:^data/db/(.*))|(?:^conf/standalone[.](.*))|(?:^conf/enterprise[.](.*))|(?:^standalone/(.*))|(?:^Output/(.*))|(?:^Microsoft.VC90.CRT/(.*))|(?:^notUsed/(.*))|(?:^(.*)\.pxd)
threadsafe: true
version: '2'
One approach: You can set up your dispatch file so that certain of your task handlers are routed to a specific module.
Note: after you make changes to your dispatch.yaml
file, you'll need to run
appcfg.py update_dispatch <proj_dir>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With