Sha256: ee20fc86bf8bb10d4d15bec90db2a8609f69ed6758cf9484b0f49f8c0c76ac6c

Contents?: true

Size: 772 Bytes

Versions: 3

Compression:

Stored size: 772 Bytes

Contents

# frozen_string_literal: true

module GoodJob
  class PerformancesController < ApplicationController
    def show
      if GoodJob::DiscreteExecution.duration_interval_migrated?
        @performances = GoodJob::DiscreteExecution
                        .where.not(job_class: nil)
                        .group(:job_class)
                        .select("
                            job_class,
                            COUNT(*) AS executions_count,
                            AVG(duration) AS avg_duration,
                            MIN(duration) AS min_duration,
                            MAX(duration) AS max_duration
                          ")
                        .order("job_class")
      else
        @needs_upgrade = true
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
good_job-3.99.1 app/controllers/good_job/performances_controller.rb
good_job-3.99.0 app/controllers/good_job/performances_controller.rb
good_job-3.30.1 app/controllers/good_job/performances_controller.rb