Moved sleep time to the implementation

This commit is contained in:
Luca Frosini 2024-03-08 11:46:07 +01:00
parent 02a67aa9b8
commit 0abad39443
3 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,7 @@
package org.gcube.accounting.aggregator.persist;
import java.io.File;
import java.util.concurrent.TimeUnit;
import org.gcube.accounting.aggregator.persistence.AggregatorPersistenceFactory;
import org.gcube.accounting.aggregator.persistence.AggregatorPersistenceSrc;
@ -37,6 +38,7 @@ public class DeleteDocument extends DocumentElaboration {
String id = jsonNode.get(ID).asText();
logger.trace("Going to delete record with id {}", id);
aggregatorPersistenceSrc.deleteRecord(jsonNode);
TimeUnit.MILLISECONDS.sleep(2);
}
}

View File

@ -84,7 +84,6 @@ public abstract class DocumentElaboration {
}
try {
elaborateLine(line);
TimeUnit.MILLISECONDS.sleep(3);
elaborate = false;
} catch(Exception e) {
if(i != 1) {

View File

@ -6,6 +6,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import java.util.concurrent.TimeUnit;
import org.gcube.accounting.aggregator.elaboration.Elaborator;
import org.gcube.accounting.aggregator.persistence.AggregatorPersistenceDst;
@ -118,6 +119,7 @@ public class InsertDocument extends DocumentElaboration {
// count = 0;
// }
TimeUnit.MILLISECONDS.sleep(2);
}
@Override