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,6 +270,8 @@ public class ConfigManager
} }
Runnable task = () ->
{
try try
{ {
saveToFile(); saveToFile();
@@ -278,6 +280,8 @@ public class ConfigManager
{ {
log.warn("unable to save configuration file", 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,6 +310,8 @@ public class ConfigManager
} }
} }
Runnable task = () ->
{
try try
{ {
saveToFile(); saveToFile();
@@ -314,6 +320,8 @@ public class ConfigManager
{ {
log.warn("unable to save configuration file", 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);