Skip to content
Snippets Groups Projects
Commit ba4e8fba authored by Sören Henning's avatar Sören Henning
Browse files

Merge branch 'enhance-logging' into 'theodolite-kotlin'

Enhance logging

See merge request !165
parents 9808367c 9f3923b7
No related branches found
No related tags found
2 merge requests!165Enhance logging,!159Re-implementation of Theodolite with Kotlin/Quarkus
Pipeline #3884 passed
...@@ -53,10 +53,10 @@ class ExecutionHandler( ...@@ -53,10 +53,10 @@ class ExecutionHandler(
*/ */
@Synchronized @Synchronized
override fun onUpdate(oldExecution: ExecutionCRD, newExecution: ExecutionCRD) { override fun onUpdate(oldExecution: ExecutionCRD, newExecution: ExecutionCRD) {
logger.info { "Receive update event for execution ${oldExecution.metadata.name}" }
newExecution.spec.name = newExecution.metadata.name newExecution.spec.name = newExecution.metadata.name
oldExecution.spec.name = oldExecution.metadata.name oldExecution.spec.name = oldExecution.metadata.name
if(gson.toJson(oldExecution.spec) != gson.toJson(newExecution.spec)) { if(gson.toJson(oldExecution.spec) != gson.toJson(newExecution.spec)) {
logger.info { "Receive update event for execution ${oldExecution.metadata.name}" }
when(this.stateHandler.getExecutionState(newExecution.metadata.name)) { when(this.stateHandler.getExecutionState(newExecution.metadata.name)) {
States.RUNNING -> { States.RUNNING -> {
this.stateHandler.setExecutionState(newExecution.spec.name, States.RESTART) this.stateHandler.setExecutionState(newExecution.spec.name, States.RESTART)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment