sensu 0.19.0-java → 0.19.1-java
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/CHANGELOG.md +11 -0
- data/lib/sensu/api/process.rb +1 -1
- data/lib/sensu/constants.rb +1 -1
- data/lib/sensu/daemon.rb +1 -1
- data/lib/sensu/server/handle.rb +1 -2
- data/lib/sensu/server/socket.rb +23 -11
- data/lib/sensu/utilities.rb +1 -1
- data/sensu.gemspec +3 -3
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9090016c767406f29e1f3580850f4361c5b1f55f
|
4
|
+
data.tar.gz: 2c0424c86607bf6a1fccb19c7f493c68dc75937f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a81971aa8613203a0aec89906bffd3cf301db9c9448326c361b0869afff9762812d6db43c51f282fdb53cc31712d02d63f93b14b5d6d7e1ac2a604927b393c62
|
7
|
+
data.tar.gz: 83aec706451de5300dbe3cf979caa2a39140138b59de61f2d1414c3dae577531d60360902d2926da53dfb88114030dcb89394e58f6b232452853a8f6e4451bcc
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
## 0.19.1 - 2015-06-04
|
2
|
+
|
3
|
+
### Other
|
4
|
+
|
5
|
+
Now using an EventMachine timer for the TCP handler connection timeout, as
|
6
|
+
`pending_connect_timeout()` and `comm_inactivity_timeout()` are not
|
7
|
+
currently supported on all platforms.
|
8
|
+
|
9
|
+
Updated Thin and UUID tools to the latest versions, which include
|
10
|
+
improvements and bug fixes.
|
11
|
+
|
1
12
|
## 0.19.0 - 2015-06-01
|
2
13
|
|
3
14
|
### Features
|
data/lib/sensu/api/process.rb
CHANGED
data/lib/sensu/constants.rb
CHANGED
data/lib/sensu/daemon.rb
CHANGED
data/lib/sensu/server/handle.rb
CHANGED
@@ -61,8 +61,7 @@ module Sensu
|
|
61
61
|
end
|
62
62
|
socket.on_error = on_error
|
63
63
|
timeout = handler[:timeout] || 10
|
64
|
-
socket.
|
65
|
-
socket.comm_inactivity_timeout = timeout
|
64
|
+
socket.set_timeout(timeout)
|
66
65
|
socket.send_data(event_data.to_s)
|
67
66
|
socket.close_connection_after_writing
|
68
67
|
end
|
data/lib/sensu/server/socket.rb
CHANGED
@@ -10,26 +10,38 @@ module Sensu
|
|
10
10
|
# @return [Proc] callback to be called when there is an error.
|
11
11
|
attr_accessor :on_error
|
12
12
|
|
13
|
-
#
|
14
|
-
#
|
15
|
-
#
|
13
|
+
# Create a timeout timer to immediately close the socket
|
14
|
+
# connection and set `@timed_out` to true to indicate that the
|
15
|
+
# timeout caused the connection to close. The timeout timer is
|
16
|
+
# stored with `@timeout_timer`, so that it can be cancelled when
|
17
|
+
# the connection is closed.
|
18
|
+
#
|
19
|
+
# @param timeout [Numeric] in seconds.
|
20
|
+
def set_timeout(timeout)
|
21
|
+
@timeout_timer = EM::Timer.new(timeout) do
|
22
|
+
@timed_out = true
|
23
|
+
close_connection
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
# Record the current time when connected.
|
16
28
|
def connection_completed
|
17
29
|
@connected_at = Time.now.to_f
|
18
|
-
@inactivity_timeout = comm_inactivity_timeout
|
19
30
|
end
|
20
31
|
|
21
32
|
# Determine if the connection and data transmission was
|
22
33
|
# successful and call the appropriate callback, `@on_success`
|
23
|
-
# or `@on_error`, providing it with a message.
|
34
|
+
# or `@on_error`, providing it with a message. Cancel the
|
35
|
+
# connection timeout timer `@timeout_timer`, if it is set. The
|
24
36
|
# `@connected_at` timestamp indicates that the connection was
|
25
|
-
# successful. If
|
26
|
-
# timeout
|
27
|
-
#
|
37
|
+
# successful. If `@timed_out` is true, the connection was closed
|
38
|
+
# by the connection timeout, and the data is assumed to not have
|
39
|
+
# been transmitted.
|
28
40
|
def unbind
|
41
|
+
@timeout_timer.cancel if @timeout_timer
|
29
42
|
if @connected_at
|
30
|
-
|
31
|
-
|
32
|
-
@on_error.call("socket inactivity timeout")
|
43
|
+
if @timed_out
|
44
|
+
@on_error.call("socket timeout")
|
33
45
|
else
|
34
46
|
@on_success.call("wrote to socket")
|
35
47
|
end
|
data/lib/sensu/utilities.rb
CHANGED
data/sensu.gemspec
CHANGED
@@ -15,9 +15,9 @@ Gem::Specification.new do |s|
|
|
15
15
|
|
16
16
|
s.add_dependency "json" if RUBY_VERSION < "1.9"
|
17
17
|
s.add_dependency "multi_json", "1.11.0"
|
18
|
-
s.add_dependency "uuidtools", "2.1.
|
18
|
+
s.add_dependency "uuidtools", "2.1.5"
|
19
19
|
s.add_dependency "eventmachine", "1.0.3"
|
20
|
-
s.add_dependency "sensu-em", "2.5.
|
20
|
+
s.add_dependency "sensu-em", "2.5.1"
|
21
21
|
s.add_dependency "sensu-logger", "1.0.0"
|
22
22
|
s.add_dependency "sensu-settings", "1.9.0"
|
23
23
|
s.add_dependency "sensu-extension", "1.1.2"
|
@@ -27,7 +27,7 @@ Gem::Specification.new do |s|
|
|
27
27
|
s.add_dependency "em-redis-unified", "1.0.0"
|
28
28
|
s.add_dependency "sinatra", "1.4.6"
|
29
29
|
s.add_dependency "async_sinatra", "1.2.0"
|
30
|
-
s.add_dependency "thin", "1.
|
30
|
+
s.add_dependency "thin", "1.6.3" unless RUBY_PLATFORM =~ /java/
|
31
31
|
|
32
32
|
s.add_development_dependency "rake", "~> 10.3"
|
33
33
|
s.add_development_dependency "rspec", "~> 3.0.0"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.19.
|
4
|
+
version: 0.19.1
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Sean Porter
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-06-
|
12
|
+
date: 2015-06-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.1.
|
33
|
+
version: 2.1.5
|
34
34
|
name: uuidtools
|
35
35
|
prerelease: false
|
36
36
|
type: :runtime
|
@@ -38,7 +38,7 @@ dependencies:
|
|
38
38
|
requirements:
|
39
39
|
- - '='
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 2.1.
|
41
|
+
version: 2.1.5
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
@@ -58,7 +58,7 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 2.5.
|
61
|
+
version: 2.5.1
|
62
62
|
name: sensu-em
|
63
63
|
prerelease: false
|
64
64
|
type: :runtime
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
requirements:
|
67
67
|
- - '='
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 2.5.
|
69
|
+
version: 2.5.1
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|