diff --git a/src/main/java/eu/openaire/urls_worker/util/AssignmentsHandler.java b/src/main/java/eu/openaire/urls_worker/util/AssignmentsHandler.java index 8286c7d..b2a2b08 100644 --- a/src/main/java/eu/openaire/urls_worker/util/AssignmentsHandler.java +++ b/src/main/java/eu/openaire/urls_worker/util/AssignmentsHandler.java @@ -136,6 +136,8 @@ public class AssignmentsHandler { else postWorkerReport(assignmentRequestCounter); + // The "postWorkerReport()" above, may fail, but the numbers below still stand, as they are affected by the results themselves, rather than the "posting" of them to the Controller. + numHandledAssignmentsBatches ++; // This is used later to stop this app, if a user-defined upper limit is set and reached. // Every time we reach a "limit" of handled id-url clear some data-structures of the underlying "PublicationsRetriever" program. @@ -186,6 +188,10 @@ public class AssignmentsHandler { if ( responseCode == HttpStatus.OK.value() ) { logger.info("The submission of the WorkerReport of assignments_" + assignmentRequestCounter + " to the Controller, and the full-text delivering, were successful!"); return true; + } + else if ( responseCode == HttpStatus.MULTI_STATUS.value() ) { + logger.warn("The submission of the WorkerReport of assignments_" + assignmentRequestCounter + " to the Controller was successful, but the full-texts' delivering failed!"); + return true; } else { logger.error("HTTP-Connection problem with the submission of the WorkerReport of assignment_" + assignmentRequestCounter + " to the Controller. Error-code was: " + responseCode); return false;