Hi,

There are a couple of ways to check if an instance of App Engine is up and 
running however they are all external to the app itself. Based on my 
research, it seems that what you are looking for is not available on App 
Engine at the moment and due to that I would recommend that you file a 
feature request via this page 
<http://issuetracker.google.com/issues/new?component=187191&template=1162953>
.

Please provide more information about the use case and the end result that 
you are trying to achieve. This will help our App Engine engineering team 
narrow down exactly how the feature should be implemented. 

One of the ways to check externally if an instance  is running, would be to 
use the LIST 
<https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions.instances/list>
 
and GET 
<https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions.instances/get>
 
methods of the apps.services.versions.instances REST resource of the App 
Engine Admin API.

The idea here would be to fetch the name of the instance via LIST and then 
use GET to obtain the Availability status of the instance. If the status is 
“Resident” or “Dynamic” it would mean that the instance is currently 
running. You could then use this to trigger an action in Cloud Datastore. 


On Saturday, January 5, 2019 at 11:24:22 AM UTC-5, NP wrote:
>
> Hello,
>
> When my application (instance) starts, I'd like to check the datastore and 
> seed some values if they do not exist. I'd like to make this check only 
> when the application (instance) starts. Is there a way to know when an 
> instance is started/restarted?
>
> Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/dd8fdc27-cfc3-4491-888d-744b1aa308f4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • [google-ap... NP
    • [goog... Vitaly Bogomolov
    • [goog... 'Nicolas (Google Cloud Platform Support)' via Google App Engine

Reply via email to