def finalize_backup_info(backup_info_pk, mapper_params):


  def tx():
    backup_info = BackupInformation.get(backup_info_pk)
    if backup_info:
      backup_info.complete_time = datetime.datetime.now()
      if backup_info.filesystem == files.GS_FILESYSTEM:
        gs_bucket = mapper_params['gs_bucket_name']
        BackupInfoWriter(gs_bucket).write(backup_info)
      backup_info.put(force_writes=True)
      logging.info('Backup %s completed', backup_info.name)
    else:
      logging.warn('Backup %s could not be found', backup_info_pk)
  db.run_in_transaction(tx)
Finalize the state of BackupInformation and creates info file for GS.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/datastore_admin/backup_handler.py/finalize_backup_info