rabbitmq-cluster 0.0.17 → 0.0.18
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/rabbitmq-cluster +3 -11
- data/lib/rabbitmq/cluster/server.rb +1 -3
- data/lib/rabbitmq/cluster/version.rb +1 -1
- metadata +3 -3
data/bin/rabbitmq-cluster
CHANGED
@@ -2,15 +2,7 @@ require 'rabbitmq/cluster'
|
|
2
2
|
|
3
3
|
server = RabbitMQ::Cluster::Server.build
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
server.synchronize
|
9
|
-
rescue => e
|
10
|
-
puts e.message
|
11
|
-
puts e.backtrace
|
12
|
-
end
|
13
|
-
sleep 5
|
14
|
-
end
|
15
|
-
sleep 1
|
5
|
+
while true do
|
6
|
+
server.synchronize if server.up?
|
7
|
+
sleep 5
|
16
8
|
end
|
@@ -74,7 +74,7 @@ class RabbitMQ::Cluster
|
|
74
74
|
end
|
75
75
|
|
76
76
|
def join_cluster
|
77
|
-
if !clustered? && nodes_to_join.any?
|
77
|
+
if up? && !clustered? && nodes_to_join.any?
|
78
78
|
system("rabbitmqctl stop_app")
|
79
79
|
system("rabbitmqctl join_cluster #{nodes_to_join.first}")
|
80
80
|
system("rabbitmqctl start_app")
|
@@ -85,8 +85,6 @@ class RabbitMQ::Cluster
|
|
85
85
|
|
86
86
|
def clustered?
|
87
87
|
client.nodes.size > 1
|
88
|
-
rescue Faraday::ConnectionFailed
|
89
|
-
false
|
90
88
|
end
|
91
89
|
|
92
90
|
def nodes_to_join
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rabbitmq-cluster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.18
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -148,7 +148,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
148
148
|
version: '0'
|
149
149
|
segments:
|
150
150
|
- 0
|
151
|
-
hash: -
|
151
|
+
hash: -1450647500986372266
|
152
152
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
153
153
|
none: false
|
154
154
|
requirements:
|
@@ -157,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
157
|
version: '0'
|
158
158
|
segments:
|
159
159
|
- 0
|
160
|
-
hash: -
|
160
|
+
hash: -1450647500986372266
|
161
161
|
requirements: []
|
162
162
|
rubyforge_project:
|
163
163
|
rubygems_version: 1.8.25
|