Closed MA1GitHub closed 3 years ago
@MoAGitHub we'll review your feedback and get back to you shortly. Thanks.
Hi @MoAGitHub, an efficient approach may be to use ScheduledExecutorService. Hope this helps.
@PatrickFarley please review above feedback for doc enhancement.
Thanks!
@GiftA-MSFT Can you please include a sample code on how to use ScheduledExecutorService with the Microsoft Azure api?
@MoAGitHub we don't have a sample code at the moment (we'd have to add this request to our backlog). Reassigning to content author for further review. Thanks.
I don't know of a way to check the result without polling it. We use a polling timer on many similar APIs. You could always shorten the time of delay to reduce the lag.
@PatrickFarley If we reduce the delay time, the billing cost will be more. As you know, Microsoft charges you based on how many calls you make. I wish there was a smarter way to achieve this (rather than to use polling technique). When I tired to reduce the time of the delay on the free tier, it started throwing exceptions and it asked to not make request so frequently (which means to increase the delay time).
[Enter feedback here] Is there any better way to get the result? Thread.sleep(1000) makes it really slow. Like instead of checking if the result is complete in a while, is there any way to for us to know if it's complete without using the while loop? while (pollForResult) { // Poll for result every second Thread.sleep(1000); readResults = vision.getReadResult(UUID.fromString(operationId));
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.