Sha256: c10e08cad919e653cea1a1937bcb9be51a3356036818cc87ba4aba7cc10f3377

Contents?: true

Size: 525 Bytes

Versions: 9

Compression:

Stored size: 525 Bytes

Contents

# require 'resque/tasks'
# will give you the resque tasks

namespace :resque do
  task :setup

  namespace :aps do
    desc "Retrieve the current queue lengths"
    task :queue_lengths => :setup do
      require 'resque'
      require 'resque_aps'

      if Resque.aps_applications_count > 0
        puts "## START ##"
        Resque.aps_application_names(0,0).each do |app|
          puts "#{app}:#{Resque.aps_notification_count_for_application(app)}"
        end
      else
        abort "None"
      end
    end
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
resque-aps-0.9.15 lib/resque/plugins/aps/tasks.rb
resque-aps-0.9.14 lib/resque/plugins/aps/tasks.rb
resque-aps-0.9.13 lib/resque_aps/tasks.rb
resque-aps-0.9.12 lib/resque_aps/tasks.rb
resque-aps-0.9.11 lib/resque_aps/tasks.rb
resque-aps-0.9.10 lib/resque_aps/tasks.rb
resque-aps-0.9.9 lib/resque_aps/tasks.rb
resque-aps-0.9.8 lib/resque_aps/tasks.rb
resque-aps-0.9.7 lib/resque_aps/tasks.rb