Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
theodolite
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sören Henning
theodolite
Commits
dbe26d53
Commit
dbe26d53
authored
2 years ago
by
Luca Mertens
Browse files
Options
Downloads
Patches
Plain Diff
Only update `ExecutionStatus` every second, instead of every 100ms.
parent
7af98977
No related branches found
No related tags found
1 merge request
!301
Only update `ExecutionStatus` every second, instead of every 100ms.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/ExecutionStateHandler.kt
+3
-3
3 additions, 3 deletions
...s/theodolite/kubernetes/operator/ExecutionStateHandler.kt
with
3 additions
and
3 deletions
theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/ExecutionStateHandler.kt
+
3
−
3
View file @
dbe26d53
...
...
@@ -4,7 +4,7 @@ import io.fabric8.kubernetes.api.model.MicroTime
import
io.fabric8.kubernetes.client.NamespacedKubernetesClient
import
rocks.theodolite.kubernetes.model.crd.ExecutionCRD
import
rocks.theodolite.kubernetes.model.crd.ExecutionState
import
java.
lang.Thread.sleep
import
java.
util.concurrent.TimeUnit.SECONDS
import
java.time.Instant
import
java.util.concurrent.atomic.AtomicBoolean
...
...
@@ -41,7 +41,7 @@ class ExecutionStateHandler(val client: NamespacedKubernetesClient) :
Thread
{
while
(
this
.
runExecutionDurationTimer
.
get
())
{
updateDurationState
(
resourceName
)
sleep
(
100
*
1
)
SECONDS
.
sleep
(
1
)
}
}.
start
()
}
...
...
@@ -50,6 +50,6 @@ class ExecutionStateHandler(val client: NamespacedKubernetesClient) :
fun
stopDurationStateTimer
(
resourceName
:
String
)
{
super
.
setState
(
resourceName
)
{
cr
->
cr
.
status
.
completionTime
=
MicroTime
(
Instant
.
now
().
toString
());
cr
}
this
.
runExecutionDurationTimer
.
set
(
false
)
sleep
(
100
*
2
)
SECONDS
.
sleep
(
2
)
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment