Sha256: f5277416f363ec6fdb502adb6b6ea3e1cef4a63443e0fac84c48fc9c739dbd87

Contents?: true

Size: 379 Bytes

Versions: 4

Compression:

Stored size: 379 Bytes

Contents

module Marty::Diagnostic; class DelayedJobWorkerTotalCount < Base
  diagnostic_fn(aggregatable: false) do
    count = Database.current_connections.map do |c|
      [c['application_name'], c['client_addr'] || '127.0.0.1'] if
        c['application_name'].include?('delayed')
    end.compact.uniq.count
    { 'Delayed Workers' => count.zero? ? error(count) : count }
  end
end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
marty-2.5.7 other/marty/diagnostic/delayed_job_worker_total_count.rb
marty-2.5.6 other/marty/diagnostic/delayed_job_worker_total_count.rb
marty-2.5.5 other/marty/diagnostic/delayed_job_worker_total_count.rb
marty-2.5.4 other/marty/diagnostic/delayed_job_worker_total_count.rb