Sha256: 23625ddbe92bafd1c73166475722ad97b25a762ece375d327b8ff328141d6567
Contents?: true
Size: 833 Bytes
Versions: 20
Compression:
Stored size: 833 Bytes
Contents
# frozen_string_literal: true module Karafka module Web module Ui module Controllers # Active jobs (work) reporting controller class Jobs < Base # Lists jobs def index current_state = Models::State.current! processes = Models::Processes.active(current_state) # Aggregate jobs and inject the process info into them for better reporting jobs_total = processes.flat_map do |process| process.jobs.map do |job| job.to_h[:process] = process job end end @jobs, @next_page = Ui::Lib::PaginateArray.new.call( jobs_total, @params.current_page ) respond end end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems