Merge branch 'stable-2.12'
* stable-2.12: ChangeCleanupConfig: Allow canonical web URL to be null Daemon: Don't add change cleanup module when running as slave Daemon: Don't add index commands when running as slave Change-Id: Iee663885e6db7c8def663f3ce2924a1c9f3f9e1b
This commit is contained in:
@@ -285,7 +285,9 @@ public class Daemon extends SiteProgram {
|
||||
cfgInjector = createCfgInjector();
|
||||
config = cfgInjector.getInstance(
|
||||
Key.get(Config.class, GerritServerConfig.class));
|
||||
initIndexType();
|
||||
if (!slave) {
|
||||
initIndexType();
|
||||
}
|
||||
sysInjector = createSysInjector();
|
||||
sysInjector.getInstance(PluginGuiceEnvironment.class)
|
||||
.setDbCfgInjector(dbInjector, cfgInjector);
|
||||
@@ -383,7 +385,9 @@ public class Daemon extends SiteProgram {
|
||||
}
|
||||
});
|
||||
modules.add(new GarbageCollectionModule());
|
||||
modules.add(new ChangeCleanupRunner.Module());
|
||||
if (!slave) {
|
||||
modules.add(new ChangeCleanupRunner.Module());
|
||||
}
|
||||
return cfgInjector.createChildInjector(modules);
|
||||
}
|
||||
|
||||
@@ -424,7 +428,7 @@ public class Daemon extends SiteProgram {
|
||||
}
|
||||
modules.add(new DefaultCommandModule(slave,
|
||||
sysInjector.getInstance(DownloadConfig.class)));
|
||||
if (indexType == IndexType.LUCENE) {
|
||||
if (!slave && indexType == IndexType.LUCENE) {
|
||||
modules.add(new IndexCommandsModule());
|
||||
}
|
||||
return sysInjector.createChildInjector(modules);
|
||||
|
||||
Reference in New Issue
Block a user