dead-man 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dead_man/switch.rb +4 -5
- metadata +13 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a89376cdfc0d160ae55414f84bed35c1c1984085
|
4
|
+
data.tar.gz: 78f4636e781b1b929d73f0b115bf780d24fa0135
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ccc5d18f163fbf51c23a60b91a68db9630fd99bdb78e8cbb6fe504f5cba7491cdaaefdd22a0a907a3f08d43cee70eb09d9a6ebc32c638d2a9ece356f24e2177
|
7
|
+
data.tar.gz: 9a404f8f344cd41e65ae7b6cff73a324775eddadf98b4c44d3cbaa0257abea78f14b59e2d0a6522ba075cb4226c8c3dde340be22d3616a619dfb163b6d2f9606
|
data/lib/dead_man/switch.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
module DeadMan
|
2
2
|
module Switch
|
3
|
-
INTERVAL_THRESHOLD = 0.2 # 20% padding
|
4
3
|
SWITCHES = {}
|
5
4
|
CALLBACKS = []
|
6
5
|
extend self
|
@@ -43,10 +42,10 @@ module DeadMan
|
|
43
42
|
heartbeat_at < adjusted_interval(interval).ago
|
44
43
|
end
|
45
44
|
|
46
|
-
# Gives
|
47
|
-
# e.g.
|
45
|
+
# Gives a padding on interval
|
46
|
+
# e.g. 1 minute -> 6 minutes
|
48
47
|
def adjusted_interval(interval)
|
49
|
-
interval +
|
48
|
+
interval + 5.minutes
|
50
49
|
end
|
51
50
|
|
52
51
|
def alert(switch, timestamp)
|
@@ -59,4 +58,4 @@ module DeadMan
|
|
59
58
|
end
|
60
59
|
end
|
61
60
|
end
|
62
|
-
end
|
61
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dead-man
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Coleman
|
@@ -14,56 +14,56 @@ dependencies:
|
|
14
14
|
name: rspec
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: timecop
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: redis
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: activesupport
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
description: Know when your systems are dead.
|
@@ -73,8 +73,8 @@ extensions: []
|
|
73
73
|
extra_rdoc_files: []
|
74
74
|
files:
|
75
75
|
- lib/dead_man.rb
|
76
|
-
- lib/dead_man/switch.rb
|
77
76
|
- lib/dead_man/heartbeat.rb
|
77
|
+
- lib/dead_man/switch.rb
|
78
78
|
homepage: https://github.com/tuftandneedle/dead-man
|
79
79
|
licenses:
|
80
80
|
- MIT
|
@@ -85,17 +85,17 @@ require_paths:
|
|
85
85
|
- lib
|
86
86
|
required_ruby_version: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- -
|
88
|
+
- - ">="
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '0'
|
91
91
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
92
92
|
requirements:
|
93
|
-
- -
|
93
|
+
- - ">="
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: '0'
|
96
96
|
requirements: []
|
97
97
|
rubyforge_project:
|
98
|
-
rubygems_version: 2.
|
98
|
+
rubygems_version: 2.4.5
|
99
99
|
signing_key:
|
100
100
|
specification_version: 4
|
101
101
|
summary: The dead man's switch
|