mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-18 18:51:26 +00:00
Moved call to #setOnFailed() to UpdateStatsService implementation
This commit is contained in:
@@ -36,7 +36,6 @@ public class VaultStats {
|
||||
this.updateService = new UpdateStatsService();
|
||||
updateService.setExecutor(executor);
|
||||
updateService.setPeriod(Duration.seconds(1));
|
||||
updateService.setOnFailed(event -> LOG.error("Error in UpdateStateService.", event.getSource().getException()));
|
||||
|
||||
state.addListener(this::vaultStateChanged);
|
||||
}
|
||||
@@ -60,6 +59,10 @@ public class VaultStats {
|
||||
|
||||
private class UpdateStatsService extends ScheduledService<Optional<CryptoFileSystemStats>> {
|
||||
|
||||
private UpdateStatsService() {
|
||||
setOnFailed(event -> LOG.error("Error in UpdateStateService.", getException()));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Task<Optional<CryptoFileSystemStats>> createTask() {
|
||||
return new Task<>() {
|
||||
|
||||
Reference in New Issue
Block a user