Stopped using updateDuration function when saving since we store start time and elapsed time there is no need to update those if their position in queue doesn't change
This commit is contained in:
@@ -105,7 +105,6 @@ public class BoosterCache {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void updateAndSave() {
|
public synchronized void updateAndSave() {
|
||||||
getAllActiveBoosters().forEach(Booster::updateDuration); //TODO test if this needs to be re-added to the map (it shouldn't afaik)
|
|
||||||
boosterFileStorage.saveBoosters(boosters.values().stream().flatMap(List::stream).collect(Collectors.toList()));
|
boosterFileStorage.saveBoosters(boosters.values().stream().flatMap(List::stream).collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user