使用submitAndDownloadAsync时超时 [英] Timeout while using submitAndDownloadAsync
问题描述
嗨!
最近我在使用bulkDownloadOperation下载报告时遇到了很多timeoutExceptions。
Lately I've been running to a lot of timeoutExceptions while downloading reports using bulkDownloadOperation.
我已经尝试了几次超时(最多8分钟),我不认为我理解它是如何工作的,因为它可能会等待5分钟,然后我会再次重新下载,它会在5秒内完成。
I've tried several timeouts(up to 8 mins) and I don't think I understand how it works, because it could be waiting for 5 minutes and then I will retry to download again and it would do it in 5 secs.
你知道发生了什么吗?
谢谢
BulkDownloadOperation bulkDownloadOperation = bulkServiceManager.submitDownloadAsync(submitDownloadParameters, null).get();
BulkOperationStatus<DownloadStatus> downloadStatus =
bulkDownloadOperation.trackAsync(null).get(timeout, TimeUnit.MINUTES);
推荐答案
Hello。
Hello.
有关get(timeout,TimeUnit.MINUTES)的详细信息,请参阅
未来文档。这不是特定于Bing Ads SDK的。
For details on get(timeout, TimeUnit.MINUTES) please refer to the Future docs. This is not specific to the Bing Ads SDK.
要通过SDK BulkServiceManager设置超时,您可以使用setDownloadHttpTimeoutInMilliseconds,
To set timeouts via the SDK BulkServiceManager you can use setDownloadHttpTimeoutInMilliseconds,
BulkServiceManager = new BulkServiceManager(
authorizationData,
API_ENVIRONMENT
);
BulkServiceManager.setStatusPollIntervalInMilliseconds(5000);
BulkServiceManager.setDownloadHttpTimeoutInMilliseconds(36000000);
我们将更新样本以澄清。
We'll update the samples to clarify.
如果您经常看到超时,请随时通过repro,错误消息,堆栈跟踪,SDK版本以及任何其他相关详细信息与支持部门联系。
If you see the timeout frequently please feel free to contact support with the repro, error message, stack trace, SDK version, and any other relevant details.
我希望这有帮助!
Eric
这篇关于使用submitAndDownloadAsync时超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!