当localhost运行时,如何解锁应用程序引擎数据库?

man*_*ngo 6 python google-app-engine localhost google-cloud-datastore

现在,当localhost运行时,我得到一个空白页面,但部署的应用程序很好.日志显示"数据库已锁定".如何为localhost"解锁"数据库?

Dav*_*ith 8

如果您正在运行dev_appserver的多个实例而不为其提供不同的数据存储文件/目录,则会发生这种情况.如果需要运行多个实例,请查看dev_appserver.py --help并查看指定路径/​​文件的选项.


Pau*_*vis 6

Dave W. Smith有正确的想法.我有同样的问题,并查看您需要--storage_path='some/path'为每个localhost实例设置不同的文档.

来自Docs:

 --storage_path PATH      path to the data (datastore, blobstore, etc.)
Run Code Online (Sandbox Code Playgroud)

此外,不同的端口,admin_ports必须设置为运行两个实例.