File tree Expand file tree Collapse file tree
deepl-java/src/main/java/com/deepl/api Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
55and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
66
7+ ## Unreleased
8+ ### Fixed
9+ * Changed document translation to poll the server every 5 seconds. This should greatly reduce observed document translation processing time.
10+
11+
712## [ 1.2.0] - 2023-03-22
813### Added
914* Script to check our source code for license headers and a step for them in the CI.
@@ -78,6 +83,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7883Initial version.
7984
8085
86+ [ Unreleased ] : https://github.com/DeepLcom/deepl-java/compare/v1.2.0...HEAD
8187[ 1.2.0 ] : https://github.com/DeepLcom/deepl-java/compare/v1.1.0...v1.2.0
8288[ 1.1.0 ] : https://github.com/DeepLcom/deepl-java/compare/v1.0.1...v1.1.0
8389[ 1.0.1 ] : https://github.com/DeepLcom/deepl-java/compare/v1.0.0...v1.0.1
Original file line number Diff line number Diff line change 33// license that can be found in the LICENSE file.
44package com .deepl .api ;
55
6- import static java .lang .Math .max ;
7- import static java .lang .Math .min ;
8-
96import com .deepl .api .http .HttpResponse ;
107import com .deepl .api .http .HttpResponseStream ;
118import com .deepl .api .parsing .Parser ;
@@ -1026,11 +1023,7 @@ private void checkResponse(
10261023 }
10271024
10281025 private int calculateDocumentWaitTimeMillis (Long secondsRemaining ) {
1029- if (secondsRemaining != null ) {
1030- double secs = ((double ) secondsRemaining ) / 2.0 + 1.0 ;
1031- secs = max (1.0 , min (secs , 60.0 ));
1032- return (int ) (secs * 1000 );
1033- }
1034- return 1000 ;
1026+ // secondsRemaining is currently unreliable, so just poll equidistantly
1027+ return 5000 ;
10351028 }
10361029}
You can’t perform that action at this time.
0 commit comments