Class: SolidQueueWeb::PerformanceController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- SolidQueueWeb::PerformanceController
- Defined in:
- app/controllers/solid_queue_web/performance_controller.rb
Constant Summary
Constants inherited from ApplicationController
ApplicationController::PERIOD_DURATIONS, ApplicationController::STAGGER_INTERVALS
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'app/controllers/solid_queue_web/performance_controller.rb', line 3 def index @period = params[:period].presence_in(PERIOD_DURATIONS.keys) scope = SolidQueue::Job.where.not(finished_at: nil) scope = scope.where("finished_at >= ?", PERIOD_DURATIONS[@period].ago) if @period.present? @rows = JobPerformanceStats.new(scope).rows end |