Skip to content

Commit

Permalink
splitting job-service-postgresql into a common module
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagodolphine committed Jun 23, 2023
1 parent 847a382 commit f44c0c9
Show file tree
Hide file tree
Showing 30 changed files with 146 additions and 68 deletions.
2 changes: 1 addition & 1 deletion jobs-service/jobs-service-inmemory/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<dependencies>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jobs-service-postgresql</artifactId>
<artifactId>jobs-service-postgresql-common</artifactId>
</dependency>
<dependency>
<groupId>io.quarkiverse.embedded.postgresql</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@

quarkus.datasource.db-kind=postgresql
quarkus.flyway.migrate-at-start=true
quarkus.datasource.health.enabled=true
quarkus.datasource.health.enabled=true
quarkus.flyway.locations=db/jobs-service
85 changes: 85 additions & 0 deletions jobs-service/jobs-service-postgresql-common/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.kie.kogito</groupId>
<artifactId>jobs-service</artifactId>
<version>2.0.0-SNAPSHOT</version>
</parent>

<artifactId>jobs-service-postgresql-common</artifactId>
<name>Kogito Apps :: Jobs Service :: PostgreSQL</name>
<description>Jobs Service (Timers and Async Jobs) PostgreSQL Common</description>

<dependencies>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jobs-service-common</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-reactive-pg-client</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-postgresql</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-flyway</artifactId>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jobs-service-common</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-quarkus-test-utils</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-jre8</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# Copyright 2021 Red Hat, Inc. and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
quarkus.datasource.db-kind=postgresql
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#enabling in-memory connector in case kafka is not enabled, to avoid issues with DI
mp.messaging.outgoing.kogito-job-service-job-status-events.connector=smallrye-in-memory

kogito.jobs-service.maxIntervalLimitToRetryMillis=60000
kogito.jobs-service.backoffRetryMillis=1000
kogito.service.url=http://localhost:8080
kogito.jobs-service.schedulerChunkInMinutes=10
kogito.jobs-service.loadJobIntervalInMinutes=10
kogito.jobs-service.loadJobFromCurrentTimeIntervalInMinutes=0
kogito.jobs-service.forceExecuteExpiredJobs=false
kogito.jobs-events-topic=kogito-jobs-events

# Keycloak oidc
quarkus.oidc.enabled=true
quarkus.oidc.tenant-enabled=false
%keycloak.quarkus.oidc.enabled=true
%keycloak.quarkus.oidc.tenant-enabled=true
%keycloak.quarkus.oidc.client-id=kogito-app
%keycloak.quarkus.oidc.credentials.secret=secret

quarkus.datasource.db-kind=postgresql
quarkus.flyway.migrate-at-start=true
quarkus.flyway.clean-at-start=true
quarkus.flyway.locations=db/jobs-service

# Outgoing events for the event based API integration tests
%events-support.mp.messaging.outgoing.kogito-job-service-job-request-events-emitter.connector=smallrye-kafka
%events-support.mp.messaging.outgoing.kogito-job-service-job-request-events-emitter.topic=kogito-job-service-job-request-events
%events-support.mp.messaging.outgoing.kogito-job-service-job-request-events-emitter.value.serializer=org.apache.kafka.common.serialization.StringSerializer
66 changes: 1 addition & 65 deletions jobs-service/jobs-service-postgresql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,71 +16,7 @@
<dependencies>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jobs-service-common</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-reactive-pg-client</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-postgresql</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-flyway</artifactId>
</dependency>

<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jobs-service-common</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-quarkus-test-utils</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-jre8</artifactId>
<scope>test</scope>
<artifactId>jobs-service-postgresql-common</artifactId>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,14 @@
<groupId>io.quarkus.http</groupId>
<artifactId>quarkus-http-core</artifactId>
</dependency>

<dependency>
<groupId>io.quarkiverse.embedded.postgresql</groupId>
<artifactId>quarkus-embedded-postgresql</artifactId>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jobs-service-inmemory</artifactId>
<artifactId>jobs-service-postgresql-common</artifactId>
<exclusions>
<!-- excluding resteasy-reactive since kogito runtimes uses the classic -->
<exclusion>
Expand Down
6 changes: 6 additions & 0 deletions jobs-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<module>jobs-service-internal-api</module>
<module>jobs-recipients</module>
<module>jobs-service-common</module>
<module>jobs-service-postgresql-common</module>
<module>jobs-service-postgresql</module>
<module>jobs-service-inmemory</module>
<module>kogito-addons-jobs-service</module>
Expand Down Expand Up @@ -45,6 +46,11 @@
<artifactId>jobs-service-internal-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>jobs-service-postgresql-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>job-recipient-common-http</artifactId>
Expand Down

0 comments on commit f44c0c9

Please sign in to comment.