resque-aps 0.9.10 → 0.9.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/HISTORY.md +5 -0
- data/lib/resque_aps/application.rb +1 -1
- data/lib/resque_aps/helper.rb +7 -7
- data/lib/resque_aps/server.rb +20 -20
- data/lib/resque_aps/unknown_attribute_error.rb +3 -3
- data/lib/resque_aps/version.rb +1 -1
- metadata +1 -1
data/HISTORY.md
CHANGED
|
@@ -45,7 +45,7 @@ module Resque
|
|
|
45
45
|
logger.error Application.application_exception($!, app_name) if logger
|
|
46
46
|
app.failed_aps_write n, $!
|
|
47
47
|
logger.error "Sent #{count} notifications before failure." if logger
|
|
48
|
-
|
|
48
|
+
Resque.enqueue_aps(app_name, n)
|
|
49
49
|
break
|
|
50
50
|
end
|
|
51
51
|
end
|
data/lib/resque_aps/helper.rb
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
module Resque
|
|
3
3
|
module Plugins
|
|
4
4
|
module Aps
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
module Helper
|
|
6
|
+
extend Resque::Helpers
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
def logger
|
|
9
|
+
Resque.logger
|
|
10
|
+
end
|
|
11
11
|
|
|
12
|
+
end
|
|
13
|
+
end
|
|
12
14
|
end
|
|
13
|
-
end
|
|
14
|
-
end
|
|
15
15
|
end
|
data/lib/resque_aps/server.rb
CHANGED
|
@@ -4,34 +4,34 @@ module Resque
|
|
|
4
4
|
module Plugins
|
|
5
5
|
module Aps
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
module Server
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
def self.included(base)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
base.class_eval do
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
get "/aps" do
|
|
14
|
+
# Is there a better way to specify alternate template locations with sinatra?
|
|
15
|
+
erb File.read(File.join(File.dirname(__FILE__), 'server/views/aps_applications.erb'))
|
|
16
|
+
end
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
get "/aps/:application_name" do
|
|
19
|
+
# Is there a better way to specify alternate template locations with sinatra?
|
|
20
|
+
erb File.read(File.join(File.dirname(__FILE__), 'server/views/notifications.erb'))
|
|
21
|
+
end
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
post "/aps/:application_name" do
|
|
24
|
+
Resque.enqueue(Resque::Plugins::Aps::Application, params[:application_name])
|
|
25
|
+
redirect url("/aps")
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
end
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
Resque::Server.tabs << 'APS'
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
end
|
|
34
34
|
|
|
35
|
+
end
|
|
35
36
|
end
|
|
36
|
-
end
|
|
37
37
|
end
|
data/lib/resque_aps/version.rb
CHANGED