Module: Karafka::Web::Ui::Models::Processes
- Extended by:
- Core::Helpers::Time
- Defined in:
- lib/karafka/web/ui/models/processes.rb
Overview
Note:
Active also includes processes stopped recently. We use it to provide better visibility via UI.
Represents the active processes data
Class Method Summary collapse
-
.active(state) ⇒ Array<Process>
Returns the active processes in an array and alongside of that the current state of the system.
Class Method Details
.active(state) ⇒ Array<Process>
Returns the active processes in an array and alongside of that the current state of the system. We use those together in the UI and it would be expensive to pick it up while we’ve already had it.
20 21 22 23 24 25 26 27 28 |
# File 'lib/karafka/web/ui/models/processes.rb', line 20 def active(state) = fetch_reports(state) = squash_processes_data() processes = .map(&:payload) evict_expired_processes(processes) processes = sort_processes(processes) processes.map { |process_hash| Process.new(process_hash) } end |