Skip to content

Commit

Permalink
Add worker manager and workers
Browse files Browse the repository at this point in the history
  • Loading branch information
peterhuffer committed Sep 16, 2019
1 parent 96702a8 commit 18a33a3
Show file tree
Hide file tree
Showing 20 changed files with 3,054 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ Example jobs.json
"source":" some-unique-id-1234",
"destination": "another-unique-id-5678",
"filter": "\"media.type\" like 'application/pdf'",
"suspended": false,
"suspended": false
}
]
```
Expand Down
25 changes: 25 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
<gson.version>2.8.5</gson.version>
<org.geotools.version>19.1</org.geotools.version>
<junit.version>4.12</junit.version>
<junit-jupiter.version>5.5.2</junit-jupiter.version>
<commons.lang3.version>3.9</commons.lang3.version>
<commons.collection4.version>4.4</commons.collection4.version>
<commons-text.version>1.8</commons-text.version>
Expand Down Expand Up @@ -447,6 +448,30 @@
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
Expand Down
49 changes: 38 additions & 11 deletions replication-api-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,22 @@
<groupId>io.micrometer</groupId>
<artifactId>micrometer-core</artifactId>
</dependency>
<dependency>
<groupId>com.jparams</groupId>
<artifactId>to-string-verifier</artifactId>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-core</artifactId>
</dependency>

<dependency>
<groupId>com.connexta.replication</groupId>
Expand All @@ -137,20 +153,24 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jparams</groupId>
<artifactId>to-string-verifier</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-core</artifactId>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

Expand Down Expand Up @@ -205,6 +225,13 @@
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>post-unit-test</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>default-check</id>
<goals>
Expand All @@ -218,17 +245,17 @@
<limit implementation="org.codice.jacoco.LenientLimit">
<counter>INSTRUCTION</counter>
<value>COVEREDRATIO</value>
<minimum>0.83</minimum>
<minimum>0.84</minimum>
</limit>
<limit implementation="org.codice.jacoco.LenientLimit">
<counter>BRANCH</counter>
<value>COVEREDRATIO</value>
<minimum>0.76</minimum>
<minimum>0.80</minimum>
</limit>
<limit implementation="org.codice.jacoco.LenientLimit">
<counter>COMPLEXITY</counter>
<value>COVEREDRATIO</value>
<minimum>0.79</minimum>
<minimum>0.81</minimum>
</limit>
</limits>
</rule>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import com.connexta.replication.api.data.Task;
import com.connexta.replication.api.data.TaskInfo;
import com.connexta.replication.api.impl.queue.AbstractTask;
import com.connexta.replication.api.queue.SiteQueue;
import com.google.common.annotations.VisibleForTesting;
import io.micrometer.core.instrument.Clock;
import java.time.Duration;
Expand Down Expand Up @@ -95,6 +96,11 @@ public State getState() {
return state;
}

@Override
public SiteQueue getQueue() {
return queue;
}

/**
* Gets the optional error code indicating why the last processing of the task failed.
*
Expand Down
Loading

0 comments on commit 18a33a3

Please sign in to comment.