Another question. I have this code in my app, so that when someone comes in 
with an old key, my code will quietly convert it to the new app-id:

from google.appengine.api.app_identity import get_application_id
appname = get_application_id()

@monkeypatch_method(webapp.Request)
def get_db(self, key_attr):
  k = self.get(key_attr)
  if not k:
    return None
  key = db.Key(k)
  if key.app() == appname:
    return db.get(key)
  logging.info("Fixing up key from old app %s (%s=%s)" % ( key.app() , key_attr 
, k ))
  fixed_key = db.Key.from_path(*key.to_path())
  return db.get(fixed_key)

So what's happening is it is "fixing up" every key, because 
get_application_id() doesn't have "s~" on the front.

What should I call to get the app id used in Keys? (The one with the s~ in 
front?)

(BTW: This approach turned out to be a real time-saver for migrating my blobs. 
I could pass the old version keys from the new HR version, and it fixed them up 
into its own namespace without my having to even think about it.)

-Joshua

On Nov 11, 2011, at 1:16 PM, Joshua Smith wrote:

> OK, so the migration from MS to HR was really fast, and I ran into no 
> problems.  Woo hoo!
> 
> I didn't do the alias step, because I now need to figure out how to move my 
> old blobs into the new app, and I suspect that if I did the alias that would 
> get really, really hard. Right?
> 
> So instead, I changed the mapping of my www.myapp.com to point to the HR 
> version using google apps domain management.  Seems to have worked.  Woo hoo 
> again!
> 
> How do I get my post-migration email budget back up to 2000?  App ID of the 
> new app is towngovernment-hr
> 
> Now to move the blobs...
> 
> On Nov 10, 2011, at 9:49 AM, Joshua Smith wrote:
> 
>> Guess I know what I'll be doing on my day off tomorrow.
>> 
>> In case anyone didn't notice this in the docs:
>> 
>> Currently, the HRD Migration Tool does not support copying data from 
>> Blobstore. If you use Blobstore, you need to manually copy that data over.
>> 
>> Ugh.  That's a pretty huge hole in the tool.
>> 
>> Perhaps I know what I'll be doing all weekend…
>> 
>> -Joshua
>> 
>> On Nov 9, 2011, at 4:33 PM, Stacy (Google) wrote:
>> 
>>> We’ve just released a new self service HRD migration tool.  This tool 
>>> copies all of your data to HRD minimizing read-only times by using a 
>>> multi-phase approach.  Please see the documentation for details on how to 
>>> use this.  This tool is still considered experimental, please report 
>>> problems you experience here in the forum or to the external issue 
>>> tracker.We are still working on solutions for users of blobstore.
>>> Using HRD makes your app eligible for our SLA, and will lead to much better 
>>> availability and more consistent performance.  We think every app will 
>>> benefit from the switch to HRD.
>>> 
>>> Stacy
>>> 
>>> -- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "Google App Engine" group.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msg/google-appengine/-/RzmZ--blDgIJ.
>>> To post to this group, send email to google-appengine@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> google-appengine+unsubscr...@googlegroups.com.
>>> For more options, visit this group at 
>>> http://groups.google.com/group/google-appengine?hl=en.
>> 
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Google App Engine" group.
>> To post to this group, send email to google-appengine@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> google-appengine+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/google-appengine?hl=en.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to