5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# File 'app/controllers/good_job/metrics_controller.rb', line 5
def primary_nav
jobs_count = GoodJob::Job.count
batches_count = GoodJob::BatchRecord.all.size
cron_entries_count = GoodJob::CronEntry.all.size
processes_count = GoodJob::Process.active.count
discarded_count = GoodJob::Job.discarded.count
render json: {
jobs_count: helpers.number_to_human(jobs_count),
batches_count: helpers.number_to_human(batches_count),
cron_entries_count: helpers.number_to_human(cron_entries_count),
processes_count: helpers.number_to_human(processes_count),
discarded_count: helpers.number_to_human(discarded_count),
}
end
|