heartcheck-activerecord 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/heartcheck/activerecord/version.rb +1 -1
- data/lib/heartcheck/checks/activerecord.rb +4 -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: 3c68461e276639ca91c1ef9c74a1b249f64ae771
|
4
|
+
data.tar.gz: 84312b4685fd49a71aeed56cd68756115c124999
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c23fd860e5631990bc5792b319e5569a470efe79d66977e6e0a86499c4fcbc536cf47607eea924f79c8e6a87c11c8a82df1d6c2e68207d6661f6151e27f8306
|
7
|
+
data.tar.gz: f7d885c7659b45b36e57ce9bbe55fc77f4087378fc1eadb0c6443249ed827c0a277641f73e03d9cf4527f2284566734378804f6a17a3ec137eb04c6bb403859d
|
@@ -9,9 +9,12 @@ module Heartcheck
|
|
9
9
|
def validate
|
10
10
|
services.each do |service|
|
11
11
|
begin
|
12
|
-
service[:connection]
|
12
|
+
connection = service[:connection]
|
13
|
+
connection.execute('select 1')
|
13
14
|
rescue
|
14
15
|
append_error(service)
|
16
|
+
ensure
|
17
|
+
connection.close
|
15
18
|
end
|
16
19
|
end
|
17
20
|
end
|