Skip to content

Commit

Permalink
♻️ increase async retry timers (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianMindee authored Jan 9, 2025
1 parent 6c06cc1 commit 980d884
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Mindee.Cli/Commands/PredictCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ private async Task<int> EnqueueAndParseAsync(InvocationContext context, ParseOpt
new LocalInputSource(options.Path),
new PredictOptions(allWords: AllWords, fullText: FullText),
null,
new AsyncPollingOptions(maxRetries: 60));
new AsyncPollingOptions());

PrintToConsole(context.Console.Out, options, response);
return 0;
Expand Down
2 changes: 1 addition & 1 deletion src/Mindee/MindeeClientOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public sealed class AsyncPollingOptions
/// <param name="initialDelaySec"><see cref="InitialDelaySec"/></param>
/// <param name="intervalSec"><see cref="IntervalSec"/></param>
/// <param name="maxRetries"><see cref="MaxRetries"/></param>
public AsyncPollingOptions(double initialDelaySec = 2.0, double intervalSec = 1.5, int maxRetries = 30)
public AsyncPollingOptions(double initialDelaySec = 2.0, double intervalSec = 1.5, int maxRetries = 80)
{
double minInitialDelaySec = 1.0;
double minIntervalSec = 1.0;
Expand Down
2 changes: 1 addition & 1 deletion tests/Mindee.IntegrationTests/MindeeClientTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ await Assert.ThrowsAsync<Mindee403Exception>(
public async Task EnqueueAndParse_File_Standard_AsyncOnly_Async_MustSucceed()
{
var inputSource = new LocalInputSource("Resources/products/invoice_splitter/default_sample.pdf");
var pollingOptions = new AsyncPollingOptions(maxRetries: 40);
var pollingOptions = new AsyncPollingOptions();
var response = await _mindeeClient.EnqueueAndParseAsync<InvoiceSplitterV1>(
inputSource, pollingOptions: pollingOptions);

Expand Down

0 comments on commit 980d884

Please sign in to comment.