Sha256: 432851f5e603d41219a48abbbfb9820968f2c31115c0f8eeba5ddb8374b623b1

Contents?: true

Size: 426 Bytes

Versions: 26

Compression:

Stored size: 426 Bytes

Contents

module Marty::Diagnostic; class DelayedJobWorkers < Base
  diagnostic_fn do
    my_ip = Node.my_ip
    workers = Database.current_connections.map do |c|
      ip   = c['client_addr'] || '127.0.0.1'
      name = c['application_name']
      name if name.include?('delayed') && (ip == my_ip || ip == '127.0.0.1')
    end.compact.uniq.count
    {'Delayed Workers / Node' => workers.zero? ? error(workers) : workers}
  end
end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
marty-2.5.2 other/marty/diagnostic/delayed_job_workers.rb
marty-2.5.1 other/marty/diagnostic/delayed_job_workers.rb
marty-2.5.0 other/marty/diagnostic/delayed_job_workers.rb
marty-2.4.9 other/marty/diagnostic/delayed_job_workers.rb
marty-2.4.8 other/marty/diagnostic/delayed_job_workers.rb
marty-2.4.7 other/marty/diagnostic/delayed_job_workers.rb
marty-2.4.6 other/marty/diagnostic/delayed_job_workers.rb
marty-2.4.5 other/marty/diagnostic/delayed_job_workers.rb
marty-2.4.4 other/marty/diagnostic/delayed_job_workers.rb
marty-2.4.3 other/marty/diagnostic/delayed_job_workers.rb
marty-2.4.2 other/marty/diagnostic/delayed_job_workers.rb
marty-2.4.1 other/marty/diagnostic/delayed_job_workers.rb
marty-2.4.0 other/marty/diagnostic/delayed_job_workers.rb
marty-2.3.15 other/marty/diagnostic/delayed_job_workers.rb
marty-2.3.14 other/marty/diagnostic/delayed_job_workers.rb
marty-2.3.13 other/marty/diagnostic/delayed_job_workers.rb
marty-2.3.12 other/marty/diagnostic/delayed_job_workers.rb
marty-2.3.11 other/marty/diagnostic/delayed_job_workers.rb
marty-2.3.10 other/marty/diagnostic/delayed_job_workers.rb
marty-2.3.9 other/marty/diagnostic/delayed_job_workers.rb