Merge "Add config option to reindex all groups on slave startup"
This commit is contained in:
@@ -343,9 +343,6 @@ public abstract class AbstractDaemonTest {
|
||||
server.getTestInjector().injectMembers(resetter);
|
||||
}
|
||||
initSsh();
|
||||
// The server restart threw away all indices. Only reindex all groups as we only have the group
|
||||
// index in slave mode.
|
||||
reindexAllGroups();
|
||||
}
|
||||
|
||||
private void reindexAllGroups() throws OrmException, IOException, ConfigInvalidException {
|
||||
|
||||
@@ -82,6 +82,11 @@ public class PeriodicGroupIndexer implements Runnable {
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
boolean runOnStartup = cfg.getBoolean("index", "scheduledIndexer", "runOnStartup", true);
|
||||
if (runOnStartup) {
|
||||
runner.run();
|
||||
}
|
||||
|
||||
boolean isEnabled = cfg.getBoolean("index", "scheduledIndexer", "enabled", true);
|
||||
if (!isEnabled) {
|
||||
log.warn("index.scheduledIndexer is disabled");
|
||||
|
||||
Reference in New Issue
Block a user