I have a test backend defined like this in my backends.yaml
backends:
- name: mailer
class: B1
instances: 1
start: loaders/mail_backend.py
my mail_backend.py script looks like this:
from google.appengine.api import mail
from google.appengine.api import logservice
import logging
logservice.AUTOFLUSH_ENABLED = False
logging.error("Backend started!")
logservice.flush()
mail.send_mail(sender="email@email.com", to="email@email.com", subject="Testing Backend", body="Testing if backend is running")
logging.error("Backend finished running!")
logservice.flush()
When I run this locally in the SDK (v 1.7.1 on Mac OS X) it works fine (as do all my other backends) but when I deploy and update the backends nothing happens. The backend is showing that it’s running and has a Stop button showing but nothing shows up in the logs.
How can I debug what is going on here? I can’t seem to tell if the backend is even getting called. Just for kicks I also rewrote my backend to behave like a request handler and when I tried running it that way and hit the URL I designated to run it, I got an error page asking to report the problem to the App Engine team if it kept occurring. I haven’t done that yet as I really don’t want to run it as a request handler since my backends only need to run one time to load data into the datastore.
Thanks for any help
Well unfortunately this isn’t ideal as an answer but on a hunch I decided to create a new App Engine application and push my code to it.
I did that just now and now my backends work fine (no code changes BTW).
Unfortunately I lost my app engine name in the process which is kind of a drag. I wish there was a way to keep an application name inside the same account if you deleted one.