【发布时间】:2014-01-23 15:57:33
【问题描述】:
我在 Google 应用引擎上使用 Drive API。 应用服务器每天 7k 请求。
在最后一天,来自 api 的错误数量增加到近 60%。
{ "code" : 500, "message" : null }
我使用这段代码来初始化驱动器:
HttpTransport httpTransport = new NetHttpTransport();
JsonFactory jsonFactory = new JacksonFactory();
AppIdentityCredential credential =
new AppIdentityCredential.Builder(Arrays.asList(DriveScopes.DRIVE)).build();
GoogleClientRequestInitializer keyInitializer =
new CommonGoogleClientRequestInitializer(Settings.API_KEY);
Drive service = new Drive.Builder(httpTransport, jsonFactory, null)
.setHttpRequestInitializer(credential)
.setApplicationName(APP_NAME)
.setGoogleClientRequestInitializer(keyInitializer)
.build();
return service;
有人有同样的情况吗? 有什么解决办法吗?
谢谢!
更新: 已经开始工作,我这边没有任何改变。
【问题讨论】:
标签: google-app-engine google-drive-api