diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2017-03-30 18:50:44 +0200 |
---|---|---|
committer | Eric Hartmann <hartmann.eric@gmail.Com> | 2017-04-27 09:23:18 +0200 |
commit | e5be2615ac8fa5baf68589eb9224bb3d16d882f2 (patch) | |
tree | 5a070a70d028e3d7ed6f2859bd97078d4e2531fe /server/sonar-ce | |
parent | dd09efbab2e48ee1b11a98d868493d4c5457ca69 (diff) | |
download | sonarqube-e5be2615ac8fa5baf68589eb9224bb3d16d882f2.tar.gz sonarqube-e5be2615ac8fa5baf68589eb9224bb3d16d882f2.zip |
SONAR-9057 make CeQueueCleaner startable and run as startup task
Diffstat (limited to 'server/sonar-ce')
4 files changed, 26 insertions, 5 deletions
diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/CeQueueModule.java b/server/sonar-ce/src/main/java/org/sonar/ce/CeQueueModule.java index db65f99042a..a11e826cd12 100644 --- a/server/sonar-ce/src/main/java/org/sonar/ce/CeQueueModule.java +++ b/server/sonar-ce/src/main/java/org/sonar/ce/CeQueueModule.java @@ -22,7 +22,6 @@ package org.sonar.ce; import org.sonar.core.platform.Module; import org.sonar.server.computation.monitoring.CEQueueStatusImpl; import org.sonar.server.computation.monitoring.CeTasksMBeanImpl; -import org.sonar.server.computation.queue.CeQueueCleaner; import org.sonar.server.computation.queue.CeQueueInitializer; import org.sonar.server.computation.queue.InternalCeQueueImpl; @@ -36,9 +35,6 @@ public class CeQueueModule extends Module { // queue monitoring CEQueueStatusImpl.class, CeTasksMBeanImpl.class, - - // queue cleaning - CeQueueCleaner.class, // init queue state and queue processing CeQueueInitializer.class); diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java b/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java index 90fe0838bb2..ed306dd165a 100644 --- a/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java +++ b/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java @@ -68,6 +68,7 @@ import org.sonar.process.logging.LogbackHelper; import org.sonar.server.component.ComponentCleanerService; import org.sonar.server.component.ComponentFinder; import org.sonar.server.component.index.ComponentIndexer; +import org.sonar.server.computation.queue.CeQueueCleaner; import org.sonar.server.computation.queue.PurgeCeActivities; import org.sonar.server.computation.task.projectanalysis.ProjectAnalysisTaskModule; import org.sonar.server.computation.taskprocessor.CeTaskProcessorModule; @@ -400,6 +401,7 @@ public class ComputeEngineContainerImpl implements ComputeEngineContainer { LogServerId.class, ServerLifecycleNotifier.class, PurgeCeActivities.class, + CeQueueCleaner.class }; } diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/queue/package-info.java b/server/sonar-ce/src/main/java/org/sonar/ce/queue/package-info.java new file mode 100644 index 00000000000..93eae709d90 --- /dev/null +++ b/server/sonar-ce/src/main/java/org/sonar/ce/queue/package-info.java @@ -0,0 +1,23 @@ +/* + * SonarQube + * Copyright (C) 2009-2017 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +@ParametersAreNonnullByDefault +package org.sonar.ce.queue; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java index edf0062e394..33fd4cdbdb0 100644 --- a/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java +++ b/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java @@ -90,7 +90,7 @@ public class ComputeEngineContainerImplTest { CONTAINER_ITSELF + 74 // level 4 + 4 // content of CeConfigurationModule - + 5 // content of CeQueueModule + + 4 // content of CeQueueModule + 3 // content of CeHttpModule + 3 // content of CeTaskCommonsModule + 4 // content of ProjectAnalysisTaskModule |