Sha256: b7dad812a6770134f3ff89dc531a1448fc0362b96e041499d7717295657ae9c9
Contents?: true
Size: 662 Bytes
Versions: 3
Compression:
Stored size: 662 Bytes
Contents
#!/usr/bin/env ruby require 'rubygems' require 'beanstalk-client' begin beanstalk = Beanstalk::Pool.new(['localhost:11300']) loop do time = Time.now beanstalk.list_tubes['localhost:11300'].each do |tube_name| next if tube_name == 'default' stats = beanstalk.stats_tube(tube_name) message = [] message << "#{time} [#{tube_name}]" message << "total: #{stats['total-jobs']}" message << "waiting: #{stats['current-waiting']}" message << "ready: #{stats['current-jobs-ready']}" puts message.join(', ') end sleep 1 end rescue Beanstalk::NotConnected puts "beanstalk isn't up!" exit 2 end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
flapjack-0.5.5 | bin/flapjack-stats |
flapjack-0.5.4 | bin/flapjack-stats |
flapjack-0.5.3 | bin/flapjack-stats |