Skip to content

Commit

Permalink
fix Job flicking
Browse files Browse the repository at this point in the history
  • Loading branch information
y-popov committed Feb 11, 2025
1 parent 0d7907a commit 4f0ba9e
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions app.R
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,12 @@ server <- function(input, output, session) {
get_job_records(elastic_con, query = elastic_query())
})

job_records <- reactive({
req('job_breakdown_panel' %in% input$myaccordion)
job_records_cache()
job_records <- reactiveVal(NULL)

observe({
if('job_breakdown_panel' %in% input$myaccordion) {
job_records(job_records_cache())
}
})

job_breakdown <- reactive({
Expand Down Expand Up @@ -316,7 +319,7 @@ server <- function(input, output, session) {


timed_job_statistics <- reactive({
req(input$time_bucket != 'none')
req(input$time_bucket != 'none', job_records())
generate_job_statistics(
df = job_records(),
adjust_cpu = input$adjust_cpu,
Expand Down Expand Up @@ -411,7 +414,7 @@ server <- function(input, output, session) {
})

output$gpu_plot <- renderPlot({
req(input$time_bucket != "none", input$gpu_statistics_column)
req(input$time_bucket != "none", input$gpu_statistics_column, gpu_records())
generate_gpu_plot(
df = gpu_records(),
time_bucket = input$time_bucket,
Expand Down

0 comments on commit 4f0ba9e

Please sign in to comment.