Skip to content

Commit 8d60006

Browse files
authored
improve jOOQ setup, check scheduling & performance (#112)
* get rid of jOOQ Pojos and DAOs * optimize uptime check scheduling logic * move logging level defs to application-*.yml * tune up UptimeChecker to handle load better * update missing API docs * bump micronaut gradle plugin to 4.5.3 * do not use the implicit default schema in jOOQ * add API docs sanity check step to CI * adjust initial delay of uptime checks to correlate with their interval * remove API docs sanity check because of CI differences * handle non-existing HTTP status codes gracefully * handle relative paths during redirection * enhance uptime error logging & saving * streamline DI around jOOQ * change baseimage to liberica-slim and build for arm64 * remove unused config prop * add kuvasz to the localdev compose file * schedule the checks with a delay, not a rate * increase HTTP checker's read timeout and thread-pool size * prevent jOOQ banner to show up upon startup
1 parent e391310 commit 8d60006

File tree

69 files changed

+1050
-2731
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1050
-2731
lines changed

build.gradle.kts

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import org.jooq.meta.jaxb.MatcherRule
2-
import org.jooq.meta.jaxb.MatcherTransformType
3-
import org.jooq.meta.jaxb.Matchers
4-
import org.jooq.meta.jaxb.MatchersTableType
1+
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
52

63
buildscript {
74
val jooqVersion: String by project
@@ -30,6 +27,7 @@ plugins {
3027
id("com.github.ben-manes.versions")
3128
id("org.jlleitschuh.gradle.ktlint")
3229
id("org.flywaydb.flyway")
30+
id("com.gradleup.shadow")
3331
}
3432

3533
val gitVersion: groovy.lang.Closure<String> by extra
@@ -183,14 +181,22 @@ tasks.withType<JavaExec> {
183181
systemProperty("micronaut.environments", "dev")
184182
}
185183

184+
tasks.withType<ShadowJar> {
185+
mergeServiceFiles()
186+
}
187+
186188
jib {
187189
from {
188-
image = "gcr.io/distroless/java17-debian11"
190+
image = "bellsoft/liberica-runtime-container:jre-17-cds-slim-musl"
189191
platforms {
190192
platform {
191193
os = "linux"
192194
architecture = "amd64"
193195
}
196+
platform {
197+
os = "linux"
198+
architecture = "arm64"
199+
}
194200
}
195201
}
196202
to {
@@ -232,32 +238,18 @@ jooq {
232238
generator.apply {
233239
database.apply {
234240
inputSchema = dbSchema
235-
isOutputSchemaToDefault = true
241+
isOutputSchemaToDefault = false
236242
excludes = "flyway_schema_history"
237243
}
238244
generate.apply {
239245
isDeprecated = false
240246
isValidationAnnotations = false
241247
isFluentSetters = true
242-
isDaos = true
243248
}
244249
target.apply {
245250
directory = "src/jooq/java"
246251
packageName = "com.kuvaszuptime.kuvasz"
247252
}
248-
strategy.apply {
249-
name = "PojoSuffixStrategy"
250-
matchers = Matchers().apply {
251-
tables = listOf(
252-
MatchersTableType().apply {
253-
pojoClass = MatcherRule().apply {
254-
transform = MatcherTransformType.PASCAL
255-
expression = "\$0_Pojo"
256-
}
257-
}
258-
)
259-
}
260-
}
261253
}
262254
}
263255
}

0 commit comments

Comments
 (0)