aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-ce
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2018-12-19 22:16:05 +0100
committerSonarTech <sonartech@sonarsource.com>2019-01-09 20:21:07 +0100
commit0c376153dd00a6d06efc2d60fe47801d7a9fae96 (patch)
tree7670d6897ac7b8058ad8ceb2653db27eee433f14 /server/sonar-ce
parente428c8d0491dcc6b0b5cab846156d5a542668708 (diff)
downloadsonarqube-0c376153dd00a6d06efc2d60fe47801d7a9fae96.tar.gz
sonarqube-0c376153dd00a6d06efc2d60fe47801d7a9fae96.zip
SONARCLOUD-310 add WS api/ce/timeout_tasks
Diffstat (limited to 'server/sonar-ce')
-rw-r--r--server/sonar-ce/src/main/java/org/sonar/ce/queue/InternalCeQueueImpl.java16
1 files changed, 1 insertions, 15 deletions
diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/queue/InternalCeQueueImpl.java b/server/sonar-ce/src/main/java/org/sonar/ce/queue/InternalCeQueueImpl.java
index a8a13b9cbb3..4468e1ab7af 100644
--- a/server/sonar-ce/src/main/java/org/sonar/ce/queue/InternalCeQueueImpl.java
+++ b/server/sonar-ce/src/main/java/org/sonar/ce/queue/InternalCeQueueImpl.java
@@ -60,15 +60,13 @@ import static org.sonar.core.util.stream.MoreCollectors.uniqueIndex;
public class InternalCeQueueImpl extends CeQueueImpl implements InternalCeQueue {
private static final Logger LOG = Loggers.get(InternalCeQueueImpl.class);
- private final System2 system2;
private final DbClient dbClient;
private final CEQueueStatus queueStatus;
private final ComputeEngineStatus computeEngineStatus;
public InternalCeQueueImpl(System2 system2, DbClient dbClient, UuidFactory uuidFactory, CEQueueStatus queueStatus,
DefaultOrganizationProvider defaultOrganizationProvider, ComputeEngineStatus computeEngineStatus) {
- super(dbClient, uuidFactory, defaultOrganizationProvider);
- this.system2 = system2;
+ super(system2, dbClient, uuidFactory, defaultOrganizationProvider);
this.dbClient = dbClient;
this.queueStatus = queueStatus;
this.computeEngineStatus = computeEngineStatus;
@@ -176,18 +174,6 @@ public class InternalCeQueueImpl extends CeQueueImpl implements InternalCeQueue
}
}
- private long updateExecutionFields(CeActivityDto activityDto) {
- Long startedAt = activityDto.getStartedAt();
- if (startedAt == null) {
- return 0L;
- }
- long now = system2.now();
- long executionTimeInMs = now - startedAt;
- activityDto.setExecutedAt(now);
- activityDto.setExecutionTimeMs(executionTimeInMs);
- return executionTimeInMs;
- }
-
@Override
public void cancelWornOuts() {
try (DbSession dbSession = dbClient.openSession(false)) {