mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-24 13:03:55 +00:00
use less aggressive time period for polling master data import progress
This commit is contained in:
1 parent
8e0b381c06
commit
bc0de434d7
2 files changed
+6
-5
No files matched your search
+5
-4
@@ -10,8 +10,10 @@ import java.util.concurrent.locks.ReentrantLock;
|
||||
import com.sap.sailing.domain.common.DataImportProgress;
|
||||
|
||||
public class DataImportLockWithProgress extends ReentrantLock {
|
||||
|
||||
private static final int TIME_TO_DELETE_PROGRESS_ENTRY_AFTER_OPERATION_FINISHED = 60000;
|
||||
/**
|
||||
* Defaults to 60s (60000ms).
|
||||
*/
|
||||
private static final int TIME_TO_DELETE_PROGRESS_ENTRY_AFTER_OPERATION_FINISHED_IN_MILLIS = 60000;
|
||||
|
||||
private static final long serialVersionUID = -3527221613483691340L;
|
||||
|
||||
@@ -43,7 +45,6 @@ public class DataImportLockWithProgress extends ReentrantLock {
|
||||
*/
|
||||
private void setDeleteFromMapTimer(final DataImportProgress progressToDelete) {
|
||||
TimerTask deleteTask = new TimerTask() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
synchronized (progressPerId) {
|
||||
@@ -52,7 +53,7 @@ public class DataImportLockWithProgress extends ReentrantLock {
|
||||
}
|
||||
};
|
||||
Timer timer = new Timer();
|
||||
timer.schedule(deleteTask, TIME_TO_DELETE_PROGRESS_ENTRY_AFTER_OPERATION_FINISHED);
|
||||
timer.schedule(deleteTask, TIME_TO_DELETE_PROGRESS_ENTRY_AFTER_OPERATION_FINISHED_IN_MILLIS);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user