GAE-Standard Determine app.yaml application name WITHOUT context

43 views
Skip to first unread message

pj

unread,
Feb 4, 2018, 4:51:16 PM2/4/18
to google-appengine-go
My environments are defined based on the application field in the app.yaml file.
I have 1 for production and another for staging.

I normally use `appengine.AppID(c context.Context) string` 

to determine the environment in various parts of my code using an `appengine.Newcontext()`


There are parts of my code that happen independent of a request so I don't have an appengine context.
How can I determine the app.yaml application name in those situations. As a last resort I can create a warmup request and set a global variable but there could be stuff that happens before the warmup request.


I think this is actually something that can be fixed if the GAE-Go-Standard choses to.

pj

unread,
Feb 4, 2018, 4:51:51 PM2/4/18
to google-appengine-go
**
I normally use `appengine.AppID(c context.Context)`
Reply all
Reply to author
Forward
0 new messages