config manager: thread config flushes to disk too

This commit is contained in:
Adam
2018-01-29 14:15:49 -05:00
parent 1a97d56ef0
commit 4eb96e0b99

View File

@@ -270,14 +270,18 @@ public class ConfigManager
} }
try Runnable task = () ->
{ {
saveToFile(); try
} {
catch (IOException ex) saveToFile();
{ }
log.warn("unable to save configuration file", ex); catch (IOException ex)
} {
log.warn("unable to save configuration file", ex);
}
};
executor.execute(task);
ConfigChanged configChanged = new ConfigChanged(); ConfigChanged configChanged = new ConfigChanged();
configChanged.setGroup(groupName); configChanged.setGroup(groupName);
@@ -306,14 +310,18 @@ public class ConfigManager
} }
} }
try Runnable task = () ->
{ {
saveToFile(); try
} {
catch (IOException ex) saveToFile();
{ }
log.warn("unable to save configuration file", ex); catch (IOException ex)
} {
log.warn("unable to save configuration file", ex);
}
};
executor.execute(task);
ConfigChanged configChanged = new ConfigChanged(); ConfigChanged configChanged = new ConfigChanged();
configChanged.setGroup(groupName); configChanged.setGroup(groupName);