update kafka-resetter for the 3 applications
This commit is contained in:
parent
66fa1fb53a
commit
e263275479
1 changed files with 20 additions and 5 deletions
|
|
@ -66,17 +66,32 @@ tasks.withType<KotlinCompile> {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
val kafkatorioEventsServerKafkaForceReset by tasks.registering(Exec::class) {
|
val kafkatorioEventsServerKafkaForceReset by tasks.registering {
|
||||||
group = project.name
|
group = project.name
|
||||||
|
|
||||||
val cmd = """
|
fun reset(applicationId: String) = """
|
||||||
/kafka/bin/kafka-streams-application-reset.sh --application-id kafkatorio-events-processor --input-topics factorio-server-log --force
|
/kafka/bin/kafka-streams-application-reset.sh --application-id $applicationId --force
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
|
|
||||||
logging.captureStandardOutput(LogLevel.LIFECYCLE)
|
doLast {
|
||||||
|
|
||||||
|
exec {
|
||||||
|
val cmd = reset("kafkatorio-events-processor.saveTiles")
|
||||||
|
logging.captureStandardOutput(LogLevel.LIFECYCLE)
|
||||||
commandLine = parseSpaceSeparatedArgs(""" docker exec -d kafka $cmd """)
|
commandLine = parseSpaceSeparatedArgs(""" docker exec -d kafka $cmd """)
|
||||||
}
|
}
|
||||||
|
exec {
|
||||||
|
val cmd = reset("kafkatorio-events-processor.splitPackets")
|
||||||
|
logging.captureStandardOutput(LogLevel.LIFECYCLE)
|
||||||
|
commandLine = parseSpaceSeparatedArgs(""" docker exec -d kafka $cmd --input-topics factorio-server-log """)
|
||||||
|
}
|
||||||
|
exec {
|
||||||
|
val cmd = reset("kafkatorio-events-processor.playerUpdates")
|
||||||
|
logging.captureStandardOutput(LogLevel.LIFECYCLE)
|
||||||
|
commandLine = parseSpaceSeparatedArgs(""" docker exec -d kafka $cmd """)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//tasks.run.configure {
|
//tasks.run.configure {
|
||||||
// dependsOn(kafkatorioEventsServerKafkaForceReset)
|
// dependsOn(kafkatorioEventsServerKafkaForceReset)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue