fix loop condition

This commit is contained in:
Enrico Ottonello 2020-10-10 01:03:41 +02:00
parent fe614ce2ed
commit 2aafbc8506
1 changed files with 2 additions and 1 deletions

View File

@ -72,6 +72,7 @@ public class RunSPARQLQueryService {
final List<Integer> counter = Arrays.asList(new Integer(0)); final List<Integer> counter = Arrays.asList(new Integer(0));
recordIds.forEach(recordId -> { recordIds.forEach(recordId -> {
int waitAmount=1; int waitAmount=1;
int retryResult = 0;
int operationResult = executeQueryGraph(selectQueryTemplate, recordId, isCollection); int operationResult = executeQueryGraph(selectQueryTemplate, recordId, isCollection);
if (operationResult!=200) { if (operationResult!=200) {
log.error(recordId + " error_code: "+ operationResult); log.error(recordId + " error_code: "+ operationResult);
@ -85,10 +86,10 @@ public class RunSPARQLQueryService {
} catch (InterruptedException ie) { } catch (InterruptedException ie) {
log.error(ie); log.error(ie);
} }
int retryResult = 0;
retryResult = executeQueryGraph(selectQueryTemplate, recordId, isCollection); retryResult = executeQueryGraph(selectQueryTemplate, recordId, isCollection);
log.debug("retryResult: " + retryResult); log.debug("retryResult: " + retryResult);
} while (retryResult!=200); } while (retryResult!=200);
operationResult = retryResult;
} }
if (operationResult!=200) { if (operationResult!=200) {
int currentErrorsCount = errorCodesCount.get(0).intValue(); int currentErrorsCount = errorCodesCount.get(0).intValue();