def _fetch_latest_from_datastore(app_version):
 rpc = db.create_rpc(deadline=DATASTORE_DEADLINE, read_policy=db.EVENTUAL_CONSISTENCY)
 key = _get_active_config_key(app_version)
 config = None
 try:
  config = Config.get(key, rpc=rpc)
  logging.debug('Loaded most recent conf data from datastore.')
 except:
  logging.warning('Tried but failed to fetch latest conf data from the datastore.')
 if config:
  memcache.set(app_version, db.model_to_protobuf(config).Encode(), namespace=NAMESPACE)
  logging.debug('Wrote most recent conf data into memcache.')
 return config

def _fetch_latest_from_datastore ( app_version ) : rpc = db . create_rpc ( deadline = DATASTORE_DEADLINE , read_policy = db . EVENTUAL_CONSISTENCY ) key = _get_active_config_key ( app_version ) config = None try : config = Config . get ( key , rpc = rpc ) logging . debug ( 'Loaded most recent conf data from datastore.' ) except : logging . warning ( 'Tried but failed to fetch latest conf data from the datastore.' ) if config : memcache . set ( app_version , db . model_to_protobuf ( config ) . Encode ( ) , namespace = NAMESPACE ) logging . debug ( 'Wrote most recent conf data into memcache.' ) return config
get the latest configuration data for this app-version from the datastore .