aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-ce-common
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2018-06-29 16:16:59 +0200
committerSonarTech <sonartech@sonarsource.com>2018-07-04 20:21:55 +0200
commit5b947f0d78f4a63b916b10e626d29398830e5da3 (patch)
tree5f6f07544bf91e35f80771432a37753336111c95 /server/sonar-ce-common
parent9c366306f69d7d33797dc3213ed3c4ee94986433 (diff)
downloadsonarqube-5b947f0d78f4a63b916b10e626d29398830e5da3.tar.gz
sonarqube-5b947f0d78f4a63b916b10e626d29398830e5da3.zip
SONAR-10917 automatically cancel tasks already executed once
also: make CeQueueDto#started_at and CeQueueDto#workerUuid read only fields as a new task can be inserted in queue only with these two fields null
Diffstat (limited to 'server/sonar-ce-common')
-rw-r--r--server/sonar-ce-common/src/main/java/org/sonar/ce/queue/CeQueueImpl.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/server/sonar-ce-common/src/main/java/org/sonar/ce/queue/CeQueueImpl.java b/server/sonar-ce-common/src/main/java/org/sonar/ce/queue/CeQueueImpl.java
index 01b113bd64d..34a8c01f677 100644
--- a/server/sonar-ce-common/src/main/java/org/sonar/ce/queue/CeQueueImpl.java
+++ b/server/sonar-ce-common/src/main/java/org/sonar/ce/queue/CeQueueImpl.java
@@ -154,12 +154,11 @@ public class CeQueueImpl implements CeQueue {
dto.setComponentUuid(submission.getComponentUuid());
dto.setStatus(PENDING);
dto.setSubmitterUuid(submission.getSubmitterUuid());
- dto.setStartedAt(null);
dbClient.ceQueueDao().insert(dbSession, dto);
return dto;
}
- protected CeTask loadTask(DbSession dbSession, CeQueueDto dto) {
+ CeTask loadTask(DbSession dbSession, CeQueueDto dto) {
String componentUuid = dto.getComponentUuid();
if (componentUuid == null) {
return new CeQueueDtoToCeTask(defaultOrganizationProvider.get().getUuid()).apply(dto);