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

Commit

Permalink
fix: extend timeout on batch translation requests (#775)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
telpirion and gcf-owl-bot[bot] committed Sep 8, 2021
1 parent 8346fae commit 5c9b5d6
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -50,7 +50,7 @@ If you are using Maven without BOM, add this to your dependencies:
If you are using Gradle 5.x or later, add this to your dependencies

```Groovy
implementation platform('com.google.cloud:libraries-bom:22.0.0')
implementation platform('com.google.cloud:libraries-bom:23.0.0')
implementation 'com.google.cloud:google-cloud-translate'
```
Expand Down
Expand Up @@ -88,7 +88,7 @@ public static void batchTranslateText(
System.out.println("Waiting for operation to complete...");

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

System.out.printf("Total Characters: %s\n", response.getTotalCharacters());
Expand Down
Expand Up @@ -106,7 +106,7 @@ public static void batchTranslateTextWithGlossary(
System.out.println("Waiting for operation to complete...");

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

// Display the translation for each input text provided
Expand Down
Expand Up @@ -113,7 +113,7 @@ public static void batchTranslateTextWithGlossaryAndModel(
System.out.println("Waiting for operation to complete...");

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

// Display the translation for each input text provided
Expand Down
Expand Up @@ -103,7 +103,7 @@ public static void batchTranslateTextWithModel(
System.out.println("Waiting for operation to complete...");

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

// Display the translation for each input text provided
Expand Down

0 comments on commit 5c9b5d6

Please sign in to comment.