lib/sidekiq/statistic/statistic/workers.rb in sidekiq-statistic-1.0.0 vs lib/sidekiq/statistic/statistic/workers.rb in sidekiq-statistic-1.1.0

- old
+ new

@@ -7,10 +7,11 @@ worker_names.map do |worker| { name: worker, last_job_status: last_job_status_for(worker), number_of_calls: number_of_calls(worker), + queue: last_queue(worker), runtime: runtime_statistic(worker).values_hash } end end @@ -56,9 +57,13 @@ def last_job_status_for(worker) statistic_for(worker) .select(&:any?) .last[:last_job_status] + end + + def last_queue(worker) + statistic_for(worker).last[:queue] end def runtime_statistic(worker, values = nil) Runtime.new(self, worker, values) end