boutons 0.1.2 → 0.1.3
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.
- checksums.yaml +4 -4
- data/lib/boutons.rb +1 -1
- data/lib/boutons/synapse.rb +12 -2
- data/lib/boutons/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 102272d5294f5fc0f0f11e4083cdfe9efaf4ae92
|
4
|
+
data.tar.gz: 3934c1b76fe950e25876f3ce9779ea095998af50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 263751595109f332cf6972145cbd5cb082306f0298e5b4961816699f8244e817ddee65df5908c3dc85233c7e54d8a82634d696508a9a30255afd42d3e4957124
|
7
|
+
data.tar.gz: a261f982b6742e4041ad434df28b9d7c9aa0a290a70d09197285b91efc8bdef9c6450cdacc977af0e4e61309a756e056edd75bd8e35b7e47184336dd6d40e560
|
data/lib/boutons.rb
CHANGED
@@ -27,7 +27,7 @@ module Boutons
|
|
27
27
|
update
|
28
28
|
end
|
29
29
|
def with_loggers
|
30
|
-
|
30
|
+
@@synapse.service_watchers.collect{|s|s.logger}+[@@logger,@@synapse.logger].each do |logger|
|
31
31
|
yield(logger) if block_given?
|
32
32
|
end
|
33
33
|
end
|
data/lib/boutons/synapse.rb
CHANGED
@@ -7,12 +7,22 @@ module Synapse
|
|
7
7
|
@service_watchers ||= []
|
8
8
|
@service_watchers << ServiceWatcher.create(service.name, service, self)
|
9
9
|
end
|
10
|
+
# TODO: have to investigate haproxy-class of synapse a little bit more
|
11
|
+
# def remove_service service_name
|
12
|
+
# @service_watchers ||= []
|
13
|
+
# @service_watchers.each do |service_watcher|
|
14
|
+
# next unless service_watcher.name == service_name
|
15
|
+
# @service_watchers.delete(service_watcher)
|
16
|
+
# service_watcher.stop
|
17
|
+
# service_watcher = nil
|
18
|
+
# end
|
19
|
+
# end
|
10
20
|
def service_watchers
|
11
21
|
@service_watchers
|
12
22
|
end
|
13
23
|
def reconfigure!
|
14
24
|
return if @reconfiguring
|
15
|
-
@reconfiguring=true
|
25
|
+
@reconfiguring = true
|
16
26
|
@services.select{|n,s|!s.active}.each do |name,config|
|
17
27
|
log.info "attach service #{name}"
|
18
28
|
watcher = ServiceWatcher.create(name, config, self)
|
@@ -20,7 +30,7 @@ module Synapse
|
|
20
30
|
config.active=true
|
21
31
|
@service_watchers << watcher
|
22
32
|
end
|
23
|
-
@reconfiguring=false
|
33
|
+
@reconfiguring = false
|
24
34
|
@config_updated = true
|
25
35
|
end
|
26
36
|
end
|
data/lib/boutons/version.rb
CHANGED