Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #2377 - add configuration for lock expiration period #2382

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -270,21 +270,27 @@ void should_PopulateEveryTaskanaConfiguration_When_EveryBuilderFunctionIsCalled(
int expectedJobBatchSize = 50;
Instant expectedJobFirstJun = Instant.MIN;
Duration expectedJobRunEvery = Duration.ofDays(2);
Duration expectedJobLockExpirationPeriod = Duration.ofDays(2);
boolean expectedTaskCleanupJobEnabled = false;
Duration expectedTaskCleanupJobMinimumAge = Duration.ofDays(1);
boolean expectedTaskCleanupJobAllCompletedSameParentBusiness = false;
Duration expectedTaskCleanupJobLockExpirationPeriod = Duration.ofDays(2);
boolean expectedWorkbasketCleanupJobEnabled = false;
Duration expectedWorkbasketCleanupJobLockExpirationPeriod = Duration.ofDays(2);
boolean expectedSimpleHistoryCleanupJobEnabled = true;
int expectedSimpleHistoryCleanupJobBatchSize = 16;
Duration expectedSimpleHistoryCleanupJobMinimumAge = Duration.ofHours(3);
boolean expectedSimpleHistoryCleanupJobAllCompletedSameParentBusiness = false;
Duration expectedSimpleHistoryCleanupJobLockExpirationPeriod = Duration.ofDays(2);
boolean expectedTaskUpdatePriorityJobEnabled = true;
int expectedPriorityJobBatchSize = 49;
Instant expectedPriorityJobFirstRun = Instant.MIN.plus(1, ChronoUnit.DAYS);
Duration expectedTaskUpdatePriorityJobRunEvery = Duration.ofMinutes(17);
Duration expectedTaskUpdatePriorityJobLockExpirationPeriod = Duration.ofDays(2);
boolean expectedUserInfoRefreshJobEnabled = true;
Instant expectedUserRefreshJobFirstRun = Instant.MIN.plus(2, ChronoUnit.DAYS);
Duration expectedUserRefreshJobRunEvery = Duration.ofDays(5);
Duration expectedUserRefreshJobLockExpirationPeriod = Duration.ofDays(2);
Set<String> expectedJobSchedulerCustomJobs = Set.of("Job_A", "Job_B");
// user configuration
boolean expectedAddAdditionalUserInfo = true;
Expand Down Expand Up @@ -329,23 +335,32 @@ void should_PopulateEveryTaskanaConfiguration_When_EveryBuilderFunctionIsCalled(
.jobBatchSize(expectedJobBatchSize)
.jobFirstRun(expectedJobFirstJun)
.jobRunEvery(expectedJobRunEvery)
.jobLockExpirationPeriod(expectedJobLockExpirationPeriod)
.taskCleanupJobEnabled(expectedTaskCleanupJobEnabled)
.taskCleanupJobMinimumAge(expectedTaskCleanupJobMinimumAge)
.taskCleanupJobAllCompletedSameParentBusiness(
expectedTaskCleanupJobAllCompletedSameParentBusiness)
.taskCleanupJobLockExpirationPeriod(expectedTaskCleanupJobLockExpirationPeriod)
.workbasketCleanupJobEnabled(expectedWorkbasketCleanupJobEnabled)
.workbasketCleanupJobLockExpirationPeriod(
expectedWorkbasketCleanupJobLockExpirationPeriod)
.simpleHistoryCleanupJobEnabled(expectedSimpleHistoryCleanupJobEnabled)
.simpleHistoryCleanupJobBatchSize(expectedSimpleHistoryCleanupJobBatchSize)
.simpleHistoryCleanupJobMinimumAge(expectedSimpleHistoryCleanupJobMinimumAge)
.simpleHistoryCleanupJobAllCompletedSameParentBusiness(
expectedSimpleHistoryCleanupJobAllCompletedSameParentBusiness)
.simpleHistoryCleanupJobLockExpirationPeriod(
expectedSimpleHistoryCleanupJobLockExpirationPeriod)
.taskUpdatePriorityJobEnabled(expectedTaskUpdatePriorityJobEnabled)
.taskUpdatePriorityJobBatchSize(expectedPriorityJobBatchSize)
.taskUpdatePriorityJobFirstRun(expectedPriorityJobFirstRun)
.taskUpdatePriorityJobRunEvery(expectedTaskUpdatePriorityJobRunEvery)
.taskUpdatePriorityJobLockExpirationPeriod(
expectedTaskUpdatePriorityJobLockExpirationPeriod)
.userInfoRefreshJobEnabled(expectedUserInfoRefreshJobEnabled)
.userRefreshJobFirstRun(expectedUserRefreshJobFirstRun)
.userRefreshJobRunEvery(expectedUserRefreshJobRunEvery)
.userRefreshJobLockExpirationPeriod(expectedUserRefreshJobLockExpirationPeriod)
.customJobs(expectedJobSchedulerCustomJobs)
// user configuration
.addAdditionalUserInfo(expectedAddAdditionalUserInfo)
Expand Down Expand Up @@ -467,26 +482,32 @@ void should_PopulateEveryConfigurationProperty_When_UsingCopyConstructor() {
.jobBatchSize(50)
.jobFirstRun(Instant.MIN)
.jobRunEvery(Duration.ofDays(2))
.jobLockExpirationPeriod(Duration.ofDays(2))
.taskCleanupJobEnabled(false)
.taskCleanupJobMinimumAge(Duration.ofDays(1))
.taskCleanupJobAllCompletedSameParentBusiness(false)
.taskCleanupJobLockExpirationPeriod(Duration.ofDays(6))
.workbasketCleanupJobEnabled(false)
.workbasketCleanupJobLockExpirationPeriod(Duration.ofDays(7))
.simpleHistoryCleanupJobEnabled(true)
.simpleHistoryCleanupJobBatchSize(16)
.simpleHistoryCleanupJobMinimumAge(Duration.ofHours(3))
.simpleHistoryCleanupJobAllCompletedSameParentBusiness(false)
.simpleHistoryCleanupJobLockExpirationPeriod(Duration.ofDays(9))
.taskUpdatePriorityJobEnabled(true)
.taskUpdatePriorityJobBatchSize(49)
.taskUpdatePriorityJobFirstRun(Instant.MIN.plus(1, ChronoUnit.DAYS))
.taskUpdatePriorityJobRunEvery(Duration.ofMinutes(17))
.taskUpdatePriorityJobLockExpirationPeriod(Duration.ofDays(10))
.userInfoRefreshJobEnabled(true)
.userRefreshJobFirstRun(Instant.MIN.plus(2, ChronoUnit.DAYS))
.userRefreshJobRunEvery(Duration.ofDays(5))
.userRefreshJobLockExpirationPeriod(Duration.ofDays(8))
.customJobs(Set.of("Job_A", "Job_B"))
// user configuration
.addAdditionalUserInfo(true)
.minimalPermissionsToAssignDomains(Set.of(WorkbasketPermission.CUSTOM_2))
//database configuration
// database configuration
.useSpecificDb2Taskquery(false)
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,27 @@ taskana.jobs.maxRetries=4
taskana.jobs.batchSize=50
taskana.jobs.firstRunAt=2018-07-25T08:00:00Z
taskana.jobs.runEvery=P2D
taskana.jobs.lockExpirationPeriod=PT7M
taskana.jobs.cleanup.task.enable=false
taskana.jobs.cleanup.task.minimumAge=P15D
taskana.jobs.cleanup.task.allCompletedSameParentBusiness=false
taskana.jobs.cleanup.task.lockExpirationPeriod=PT4M
taskana.jobs.cleanup.workbasket.enable=false
taskana.jobs.cleanup.workbasket.lockExpirationPeriod=PT3M
taskana.jobs.cleanup.history.simple.enable=true
taskana.jobs.cleanup.history.simple.batchSize=50
taskana.jobs.cleanup.history.simple.minimumAge=P17D
taskana.jobs.cleanup.history.simple.allCompletedSameParentBusiness=false
taskana.jobs.cleanup.history.simple.lockExpirationPeriod=PT2M
taskana.jobs.priority.task.enable=true
taskana.jobs.priority.task.batchSize=50
taskana.jobs.priority.task.firstRunAt=2018-07-25T08:00:00Z
taskana.jobs.priority.task.runEvery=P3D
taskana.jobs.priority.task.lockExpirationPeriod=PT8M
taskana.jobs.refresh.user.enable=true
taskana.jobs.refresh.user.firstRunAt=2018-07-25T08:00:00Z
taskana.jobs.refresh.user.runEvery=P4D
taskana.jobs.refresh.user.lockExpirationPeriod=PT5M
taskana.jobs.customJobs=A | B | C
# user configuration
taskana.user.addAdditionalUserInfo=true
Expand Down
170 changes: 85 additions & 85 deletions lib/taskana-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,89 +40,89 @@
<version>${version.json}</version>
</dependency>
<!-- test dependencies -->
<dependency>
<groupId>pro.taskana</groupId>
<artifactId>taskana-common-data</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>pro.taskana</groupId>
<artifactId>taskana-common-test</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.ibm.db2</groupId>
<artifactId>jcc</artifactId>
<version>${version.db2}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>${version.oracle}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>db2</artifactId>
<version>${version.testcontainers}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>postgresql</artifactId>
<version>${version.testcontainers}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<dependency>
<groupId>pro.taskana</groupId>
<artifactId>taskana-common-data</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>pro.taskana</groupId>
<artifactId>taskana-common-test</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.ibm.db2</groupId>
<artifactId>jcc</artifactId>
<version>${version.db2}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>${version.oracle}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>db2</artifactId>
<version>${version.testcontainers}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>postgresql</artifactId>
<version>${version.testcontainers}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

</project>
</project>
Loading