nerve 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/nerve.rb +5 -1
- data/lib/nerve/reporter/base.rb +3 -0
- data/lib/nerve/reporter/zookeeper.rb +5 -0
- data/lib/nerve/service_watcher.rb +2 -1
- data/lib/nerve/version.rb +1 -1
- metadata +2 -2
data/Gemfile.lock
CHANGED
data/lib/nerve.rb
CHANGED
@@ -30,6 +30,10 @@ module Nerve
|
|
30
30
|
@services = opts['services']
|
31
31
|
@watchers = {}
|
32
32
|
|
33
|
+
# Any exceptions in the watcher threads should wake the main thread so
|
34
|
+
# that we can fail fast.
|
35
|
+
Thread.abort_on_exception = true
|
36
|
+
|
33
37
|
log.debug 'nerve: completed init'
|
34
38
|
end
|
35
39
|
|
@@ -43,7 +47,7 @@ module Nerve
|
|
43
47
|
begin
|
44
48
|
sleep
|
45
49
|
rescue StandardError => e
|
46
|
-
log.error
|
50
|
+
log.error "nerve: encountered unexpected exception #{e.inspect} in main thread"
|
47
51
|
raise e
|
48
52
|
ensure
|
49
53
|
$EXIT = true
|
data/lib/nerve/reporter/base.rb
CHANGED
@@ -72,11 +72,12 @@ module Nerve
|
|
72
72
|
sleep @check_interval
|
73
73
|
end
|
74
74
|
rescue StandardError => e
|
75
|
-
log.error "nerve: error in service watcher #{@name}: #{e}"
|
75
|
+
log.error "nerve: error in service watcher #{@name}: #{e.inspect}"
|
76
76
|
raise e
|
77
77
|
ensure
|
78
78
|
log.info "nerve: ending service watch #{@name}"
|
79
79
|
$EXIT = true
|
80
|
+
@reporter.stop
|
80
81
|
end
|
81
82
|
|
82
83
|
def check?
|
data/lib/nerve/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nerve
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2014-03-
|
14
|
+
date: 2014-03-06 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: zk
|