logger.info("Worker with id: \""+workerId+"\", requested "+workerAssignmentsLimit+" test-assignments. The assignments-limit of the controller is: "+this.assignmentLimit);
List<Assignment>assignments=newArrayList<>();
HashMultimap<String,String>loadedIdUrlPairs;
booleanisFirstRun=true;
booleanassignmentsLimitReached=false;
Timestamptimestamp=newTimestamp(System.currentTimeMillis());// Store it here, in order to have the same for all current records.
// Start loading urls.
while(true){
loadedIdUrlPairs=fileUtils.getNextIdUrlPairBatchFromJson();// Take urls from jsonFile.
if(fileUtils.isFinishedLoading(loadedIdUrlPairs.isEmpty(),isFirstRun))// Throws RuntimeException which is automatically passed on.
logger.info("Sending batch_"+curAssignmentsBatchCounter+" with "+assignments.size()+" assignments ("+fileUtils.duplicateIdUrlEntries.get()+" more assignments were discarded as duplicates), to worker with ID: "+workerId);