目前,我放弃了本地GCS部分并尝试使用真正的GCS。使用boto的GCE部分很容易。使用access_token,GCS部分也可以使用真正的GCS来代替本地blobstore:
cloudstorage.common.set_access_token(access_token)
根据文档:
access_token: you can get one by run 'gsutil -d ls' and copy the
str after 'Bearer'.
那个令牌只能在有限的时间内使用,所以不太理想。有没有办法设置更永久的access_token?