philae 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/philae/docker_probe.rb +5 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ffa3d30f51168d0d1ae72b1689900daf71eeb832aa9434f2c8d13040b962e156
|
4
|
+
data.tar.gz: e2eca87f43d64cf211f8d8705032f35378473c53e50dad83520bf408fbfcf857
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 186c411027e257cd9d2b482c2228e0bdc1cd8be2f68730b40ff23329ecd8b544afed4866fdad86625ecd57d3ce6a31a6627c4450110846885d8c6389e6005bae
|
7
|
+
data.tar.gz: 19377fb811659ff0a3339f223ff1502ed3678e2e9626476338811caa7e258c27676ae63f4ddb8fd1147a7bd683af5a0b6a700e386302892530637d44d4d75b75
|
data/lib/philae/docker_probe.rb
CHANGED
@@ -4,19 +4,19 @@ module Philae
|
|
4
4
|
class DockerProbe
|
5
5
|
attr_reader :name
|
6
6
|
|
7
|
-
def initialize(name, endpoint = '/var/run/docker.sock', options =
|
7
|
+
def initialize(name, endpoint = '/var/run/docker.sock', options = {})
|
8
8
|
@name = name
|
9
9
|
@endpoint = endpoint
|
10
|
-
@docker_options = options
|
10
|
+
@docker_options = {read_timeout: 50, connect_timeout: 50}.merge(options)
|
11
11
|
end
|
12
12
|
|
13
13
|
def check
|
14
14
|
Docker.url = @endpoint
|
15
|
-
Docker.options = @docker_options
|
15
|
+
Docker.options = @docker_options
|
16
16
|
begin
|
17
17
|
Docker::Container.all
|
18
|
-
rescue
|
19
|
-
return { healthy: false, comment:
|
18
|
+
rescue => e
|
19
|
+
return { healthy: false, comment: "Unable to communicate with docker (#{e.message})" }
|
20
20
|
end
|
21
21
|
|
22
22
|
return { healthy: true, comment: '' }
|
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.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- leo@scalingo.com
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2022-01-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: docker-api
|
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
120
|
- !ruby/object:Gem::Version
|
121
121
|
version: '0'
|
122
122
|
requirements: []
|
123
|
-
rubygems_version: 3.
|
123
|
+
rubygems_version: 3.2.22
|
124
124
|
signing_key:
|
125
125
|
specification_version: 4
|
126
126
|
summary: Provide an health check API
|