How to explicitly stop a Google App Engine dynamic backend when the start handler finishes?
If you configure your backend as a Dynamic backend, then the backend will stop automatically 15 minutes after your "trigger" request is processed.  If you don't send that "trigger-to-start" request again in the next 15 minutes, the backend will shutdown automatically.  Unfortunately, you'll still have to pay for a minimum of 15 minutes of uptime, even though the backend is idle for those 15 minutes.  I'm doing exactly what you're doing in my app - the backend starts, starts leasing tasks from a pull queue, and goes idle when the pull queue is empty.  I do this once every hour, so I end up paying for 24/3 = 8 hours of backend uptime everyday.  Since this is below the 9 hour quota, I'm happy (for now).
I have a backend that consumes a queue in its start handler.  When the queue is exhausted the start handler will stop.  I want the backend to stop when the start handler finishes.  I have other code that will send a request to the backend if it adds an item to this queue.  These requests merely serve to have GAE start the backend so that it can start consuming the queue.
I don't want the backend to ever be in a state where the start handler has finished but the backend remains idle.  I want it to stop so that the next request to the backend will cause GAE to start the backend again thus invoking the start handler again and start consuming the queue.
How do I accomplish this goal?