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:
Teriuihi 2023-06-30 03:46:43 +02:00
parent fc73e5a26c
commit 36a7b0cf68

View File

@ -105,7 +105,6 @@ public class BoosterCache {
}
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()));
}
}