Reputation: 113
I'm having issues getting backends to run in Google App Engine Python.
in my app.yaml, I have added this handler:
- url: /backend/.*
script: backend.app
login: admin
and in backend.app, I have a handler defined for "/".
my backends.yaml looks like this:
backends:
- name: dbops
options: dynamic
in my fronted app, I have added a taskqueue to call the backend:
taskqueue.add(url='/backend/', target='dbops')
when I look at the logs all I see are 404 errors, and the backend does not show up under the backends section, but a new instance is started if I look under instances. Anyone got any guidance as the docs for backends have not been very helpful.
Edit
After some help from Alex below, I've gotten the code running on the backend. I missed the deploy to backend step.
appcfg.py backends ./ update dbops
Now I see the backend instance running fine in the admin interface, but the taskqueue keeps returning a 404 error, and I'm sure I'm doing something stupidly wrong.
Do I configure the handlers in my backend.py the same as I do for my frontend.py? I can access the handlers defined in the frontend.py on the backend instance but not the ones defined in backend.py.
Edit 10/17/12
After some digging I discovered that my wild card handler was listed before my backend handler in apps.yaml. So now the backend handler is sort of working. I have this process defined as an admin handler, but it still times out.
Any reason why this doesn't work? It always returns a 405 error and continuously retries.
taskqueue.add(url='/backend/', target='dbops')
Upvotes: 3
Views: 1537
Reputation: 2451
/backend
will never match /backend/.*
pattern. You should add a slash at the end:
taskqueue.add(url='/backend/', target='dbops')
Also, on your backend you should probably do the same thing and define your handler on /backend/
.
Upvotes: 4