Sha256: a6a8e9414efae0307ddb8fc04895340561b9985bdf5c6183fc9b8fe6fd219221
Contents?: true
Size: 559 Bytes
Versions: 12
Compression:
Stored size: 559 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) puts "#{time.to_i} [#{tube_name}] total: #{stats['total-jobs']}, waiting: #{stats['current-waiting']}, ready: #{stats['current-jobs-ready']}" end sleep 1 end rescue Beanstalk::NotConnected puts "beanstalk isn't up!" exit 2 end
Version data entries
12 entries across 12 versions & 2 rubygems