-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
58 changed files
with
2,098 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ language: java | |
|
||
jdk: | ||
- openjdk8 | ||
- oraclejdk11 | ||
- openjdk11 | ||
|
||
install: /bin/true # skip gradle assemble | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
edison-jobs/src/main/java/de/otto/edison/jobs/configuration/DynamoJobsConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package de.otto.edison.jobs.configuration; | ||
|
||
import de.otto.edison.jobs.repository.JobMetaRepository; | ||
import de.otto.edison.jobs.repository.JobRepository; | ||
import de.otto.edison.jobs.repository.dynamo.DynamoJobMetaRepository; | ||
import de.otto.edison.jobs.repository.dynamo.DynamoJobRepository; | ||
import org.slf4j.Logger; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; | ||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import software.amazon.awssdk.services.dynamodb.DynamoDbClient; | ||
|
||
import static org.slf4j.LoggerFactory.getLogger; | ||
|
||
@Configuration | ||
@ConditionalOnProperty(prefix = "edison.jobs", name = "dynamo.enabled", havingValue = "true") | ||
@ConditionalOnBean(type = "software.amazon.awssdk.services.dynamodb.DynamoDbClient") | ||
public class DynamoJobsConfiguration { | ||
|
||
private static final Logger LOG = getLogger(DynamoJobsConfiguration.class); | ||
|
||
@Bean | ||
public JobRepository jobRepository(final DynamoDbClient dynamoDbClient, | ||
final @Value("${edison.jobs.dynamo.jobinfo.tableName}") String tableName, | ||
final @Value("${edison.jobs.dynamo.jobinfo.pageSize}") int pageSize) { | ||
LOG.info("==============================="); | ||
LOG.info("Using DynamoJobRepository with tableName {} and pageSize {}.",tableName, pageSize); | ||
LOG.info("==============================="); | ||
return new DynamoJobRepository(dynamoDbClient, tableName, pageSize); | ||
} | ||
|
||
@Bean | ||
public JobMetaRepository jobMetaRepository(final DynamoDbClient dynamoDbClient, | ||
final @Value("${edison.jobs.dynamo.jobmeta.tableName}") String tableName) { | ||
LOG.info("==============================="); | ||
LOG.info("Using DynamoJobMetaRepository with tableName {}.", tableName); | ||
LOG.info("==============================="); | ||
return new DynamoJobMetaRepository(dynamoDbClient, tableName); | ||
} | ||
|
||
} |
Oops, something went wrong.