mongrel_cluster_recovery 0.0.1 → 0.0.2
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/LICENSE +0 -0
- data/README +25 -4
- data/lib/mongrel_cluster_recovery/init.rb +2 -1
- data/mongrel_cluster_recovery.gemspec +1 -1
- metadata +1 -1
data/LICENSE
CHANGED
|
File without changes
|
data/README
CHANGED
|
@@ -1,7 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
= Mongrel Cluster Plugin
|
|
2
|
+
mongrel_clusterにrecoveryコマンドを追加します。
|
|
3
|
+
|
|
4
|
+
== recovery?
|
|
5
|
+
mongrel_cluster.ymlからport情報などを読み込み
|
|
6
|
+
port毎にstatusをcheckします。
|
|
7
|
+
1.process
|
|
8
|
+
2.pid
|
|
9
|
+
3.http response
|
|
2
10
|
|
|
3
|
-
|
|
11
|
+
checkがngの場合、該当portのみをrestartします。
|
|
4
12
|
|
|
5
|
-
|
|
6
|
-
|
|
13
|
+
== SCM
|
|
14
|
+
http://asf.rubyforge.org/svn/branches/mongrel_cluster_recovery/
|
|
7
15
|
|
|
16
|
+
== Install
|
|
17
|
+
gem install mongrel_cluster_recovery
|
|
18
|
+
|
|
19
|
+
== help
|
|
20
|
+
mongrel_rails cluster::recovery -h
|
|
21
|
+
|
|
22
|
+
== Example
|
|
23
|
+
#command line#
|
|
24
|
+
cd #{RAILS_ROOT}
|
|
25
|
+
mongrel_rails cluster::recovery --url /status/check
|
|
26
|
+
|
|
27
|
+
#cron#
|
|
28
|
+
*/10 * * * * root mongrel_rails cluster::recovery -C #{RAILS_ROOT}/config/mongrel_cluster.yml --url /status/check
|
|
@@ -17,6 +17,7 @@ module Cluster
|
|
|
17
17
|
['', '--open_timeout sec', "Port test timeout of open", :@open_timeout, 3],
|
|
18
18
|
['', '--read_timeout sec', "Port test timeout of read", :@read_timeout, 5],
|
|
19
19
|
['', '--url URL', "Port test url", :@url, '/'],
|
|
20
|
+
['', '--ip IP', "Port test IP", :@ip, 'localhost'],
|
|
20
21
|
]
|
|
21
22
|
end
|
|
22
23
|
|
|
@@ -33,7 +34,7 @@ module Cluster
|
|
|
33
34
|
else
|
|
34
35
|
begin
|
|
35
36
|
Net::HTTP.version_1_2
|
|
36
|
-
http = Net::HTTP.new(
|
|
37
|
+
http = Net::HTTP.new( @ip, _port_ )
|
|
37
38
|
http.open_timeout = @open_timeout
|
|
38
39
|
http.read_timeout = @read_timeout
|
|
39
40
|
http.start {|ac|
|