philae 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/philae/mongo_probe.rb +3 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9c4a71365a8c43ff5d00420aa0e7188ee12d4dc8
4
- data.tar.gz: 7ec3ae7de5dcd850910d69fbdc0c06476a2b2e1a
3
+ metadata.gz: e3070e46c6e7ad456cb58aae15d48fb71a9be1ec
4
+ data.tar.gz: f725eefd0197db384c7b9f2bbadb24af57572a8a
5
5
  SHA512:
6
- metadata.gz: c71c393856d29957d08362eecf519e8b18155babc2525fc253a93a52e88cc07a2b049e3d785f70cfad19331718b60e00db8b8fd90c6831d3603a7e169aa49f73
7
- data.tar.gz: 76446b301b87f81be9eaa695cf3ad968d721e8e7d27f00000a335fa8e0ff54a0b9b19bcc489d38f1b014eeebc22f026167adc8284cc74fbb9142a8f123d443dd
6
+ metadata.gz: 221ed7de887838a7f07c526606d8f3f8b4265ad2aee873da6a969302c53dda543044f2f6f7e7604f1be41f3eaa8eef084a91d6ee030ea43ac2da26847c3ca713
7
+ data.tar.gz: a9d0f3571f98918907a90a01476d824385768e1f1dfc868ff1af82ed7a50f399c4cd0f3c73f87e069fa0cf4b52c08d18b5c7e34ebe3eb9f53f85895ac7193384
@@ -13,10 +13,10 @@ module Philae
13
13
 
14
14
  def check
15
15
  begin
16
- client = Mongo::Client.new(@uri, max_read_retries: 1)
17
- db = client.database
16
+ @client ||= Mongo::Client.new(@uri, max_read_retries: 1)
17
+ db = @client.database
18
18
  db.collection_names
19
- client.close
19
+ @client.close
20
20
  rescue
21
21
  return { healthy: false, comment: 'Unable to contact mongo' }
22
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: philae
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - leo@scalingo.com