Skip to content

Commit

Permalink
fix: increase batch translate timeout to 300 (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
munkhuushmgl authored and anguillanneuf committed Dec 5, 2022
1 parent 829fdc4 commit b62b720
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public static void batchTranslateText(
client.batchTranslateTextAsync(request);

System.out.println("Waiting for operation to complete...");
BatchTranslateResponse response = future.get(180, TimeUnit.SECONDS);
BatchTranslateResponse response = future.get(300, TimeUnit.SECONDS);
System.out.printf("Total Characters: %s\n", response.getTotalCharacters());
System.out.printf("Translated Characters: %s\n", response.getTranslatedCharacters());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public static void batchTranslateTextWithGlossary(
client.batchTranslateTextAsync(request);

System.out.println("Waiting for operation to complete...");
BatchTranslateResponse response = future.get(180, TimeUnit.SECONDS);
BatchTranslateResponse response = future.get(300, TimeUnit.SECONDS);
// Display the translation for each input text provided
System.out.printf("Total Characters: %s\n", response.getTotalCharacters());
System.out.printf("Translated Characters: %s\n", response.getTranslatedCharacters());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public static void batchTranslateTextWithGlossaryAndModel(
client.batchTranslateTextAsync(request);

System.out.println("Waiting for operation to complete...");
BatchTranslateResponse response = future.get(180, TimeUnit.SECONDS);
BatchTranslateResponse response = future.get(300, TimeUnit.SECONDS);
// Display the translation for each input text provided
System.out.printf("Total Characters: %s\n", response.getTotalCharacters());
System.out.printf("Translated Characters: %s\n", response.getTranslatedCharacters());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public static void batchTranslateTextWithModel(
client.batchTranslateTextAsync(request);

System.out.println("Waiting for operation to complete...");
BatchTranslateResponse response = future.get(180, TimeUnit.SECONDS);
BatchTranslateResponse response = future.get(300, TimeUnit.SECONDS);
// Display the translation for each input text provided
System.out.printf("Total Characters: %s\n", response.getTotalCharacters());
System.out.printf("Translated Characters: %s\n", response.getTranslatedCharacters());
Expand Down

0 comments on commit b62b720

Please sign in to comment.