Skip to content
This repository was archived by the owner on Oct 14, 2023. It is now read-only.

Commit 5c9b5d6

Browse files
fix: extend timeout on batch translation requests (#775)
* fix: extend timeout on batch translation requests * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 8346fae commit 5c9b5d6

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ If you are using Maven without BOM, add this to your dependencies:
5050
If you are using Gradle 5.x or later, add this to your dependencies
5151

5252
```Groovy
53-
implementation platform('com.google.cloud:libraries-bom:22.0.0')
53+
implementation platform('com.google.cloud:libraries-bom:23.0.0')
5454
5555
implementation 'com.google.cloud:google-cloud-translate'
5656
```

samples/snippets/src/main/java/com/example/translate/BatchTranslateText.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public static void batchTranslateText(
8888
System.out.println("Waiting for operation to complete...");
8989

9090
// random number between 300 - 450 (maximum allowed seconds)
91-
long randomNumber = ThreadLocalRandom.current().nextInt(300, 450);
91+
long randomNumber = ThreadLocalRandom.current().nextInt(450, 600);
9292
BatchTranslateResponse response = future.get(randomNumber, TimeUnit.SECONDS);
9393

9494
System.out.printf("Total Characters: %s\n", response.getTotalCharacters());

samples/snippets/src/main/java/com/example/translate/BatchTranslateTextWithGlossary.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public static void batchTranslateTextWithGlossary(
106106
System.out.println("Waiting for operation to complete...");
107107

108108
// random number between 300 - 450 (maximum allowed seconds)
109-
long randomNumber = ThreadLocalRandom.current().nextInt(300, 450);
109+
long randomNumber = ThreadLocalRandom.current().nextInt(450, 600);
110110
BatchTranslateResponse response = future.get(randomNumber, TimeUnit.SECONDS);
111111

112112
// Display the translation for each input text provided

samples/snippets/src/main/java/com/example/translate/BatchTranslateTextWithGlossaryAndModel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public static void batchTranslateTextWithGlossaryAndModel(
113113
System.out.println("Waiting for operation to complete...");
114114

115115
// random number between 300 - 450 (maximum allowed seconds)
116-
long randomNumber = ThreadLocalRandom.current().nextInt(300, 450);
116+
long randomNumber = ThreadLocalRandom.current().nextInt(450, 600);
117117
BatchTranslateResponse response = future.get(randomNumber, TimeUnit.SECONDS);
118118

119119
// Display the translation for each input text provided

samples/snippets/src/main/java/com/example/translate/BatchTranslateTextWithModel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public static void batchTranslateTextWithModel(
103103
System.out.println("Waiting for operation to complete...");
104104

105105
// random number between 300 - 450 (maximum allowed seconds)
106-
long randomNumber = ThreadLocalRandom.current().nextInt(300, 450);
106+
long randomNumber = ThreadLocalRandom.current().nextInt(450, 600);
107107
BatchTranslateResponse response = future.get(randomNumber, TimeUnit.SECONDS);
108108

109109
// Display the translation for each input text provided

0 commit comments

Comments
 (0)