Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻️ increase async retry timers #290

Merged
merged 2 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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(maxRetries: 80));
sebastianMindee marked this conversation as resolved.
Show resolved Hide resolved

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(maxRetries: 80);
sebastianMindee marked this conversation as resolved.
Show resolved Hide resolved
var response = await _mindeeClient.EnqueueAndParseAsync<InvoiceSplitterV1>(
inputSource, pollingOptions: pollingOptions);

Expand Down
Loading