resque-aps 0.9.6 → 0.9.7
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY.md +4 -0
- data/lib/resque_aps/tasks.rb +14 -4
- data/lib/resque_aps/version.rb +1 -1
- data/lib/resque_aps.rb +1 -0
- metadata +3 -3
data/HISTORY.md
CHANGED
data/lib/resque_aps/tasks.rb
CHANGED
@@ -4,11 +4,21 @@
|
|
4
4
|
namespace :resque do
|
5
5
|
task :setup
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
namespace :aps do
|
8
|
+
desc "Retrieve the current queue lengths"
|
9
|
+
task :queue_lengths => :setup do
|
10
|
+
require 'resque'
|
11
|
+
require 'resque_aps'
|
11
12
|
|
13
|
+
if Resque.aps_applications_count > 0
|
14
|
+
puts "## START ##"
|
15
|
+
Resque.aps_application_names(0,0).each do |app|
|
16
|
+
puts "#{app}:#{Resque.aps_notification_count_for_application(app)}"
|
17
|
+
end
|
18
|
+
else
|
19
|
+
abort "None"
|
20
|
+
end
|
21
|
+
end
|
12
22
|
end
|
13
23
|
|
14
24
|
end
|
data/lib/resque_aps/version.rb
CHANGED
data/lib/resque_aps.rb
CHANGED
@@ -114,6 +114,7 @@ module ResqueAps
|
|
114
114
|
# Returns an array of applications based on start and count
|
115
115
|
def aps_application_names(start = 0, count = 1)
|
116
116
|
a = redis.smembers(:aps_applications)
|
117
|
+
return a if count == 0
|
117
118
|
ret = a[start..(start + count)]
|
118
119
|
return [] unless ret
|
119
120
|
ret
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 9
|
8
|
-
-
|
9
|
-
version: 0.9.
|
8
|
+
- 7
|
9
|
+
version: 0.9.7
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Ashley Martens
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-07-
|
17
|
+
date: 2010-07-26 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|