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

fix: extend timeout on batch translation requests #775

Merged
merged 3 commits into from Sep 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -50,20 +50,20 @@ 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'
```
If you are using Gradle without BOM, add this to your dependencies

```Groovy
implementation 'com.google.cloud:google-cloud-translate:2.0.6'
implementation 'com.google.cloud:google-cloud-translate:2.1.0'
```

If you are using SBT, add this to your dependencies

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-translate" % "2.0.6"
libraryDependencies += "com.google.cloud" % "google-cloud-translate" % "2.1.0"
```

## Authentication
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