我正在尝试使用 Google 协作平台搜索当前活动站点并创建自定义搜索。我需要做的第一件事是连接当前活动站点,请参阅下面提到的代码。出于调试目的,我添加了一些计时器。
Logger.log('---- line 289 (try to connect current active site): ' + (new Date().getTime()-startGetResultFromSiteTimer)/1000 + ' seconds');
var site = SitesApp.getActiveSite();
Logger.log('---- line 300 (connected current active site): ' + (new Date().getTime()-startGetResultFromSiteTimer)/1000 + ' seconds');
有时它工作得很好,后来我收到这个异常的请求:
Exception: Servicefout: SitesApp: Internal Error
非常不可靠的行为。每个请求的计时器结果完全不同。有时不到一秒,然后请求超过 30 秒。
有没有人可以解决这个问题?