@@ 119-132 (lines=14) @@ | ||
116 | * Returns true if the client can be connected to. |
|
117 | * @return bool |
|
118 | */ |
|
119 | public function ping() |
|
120 | { |
|
121 | try { |
|
122 | $this->httpClient->get('/scheduler/jobs'); |
|
123 | } catch (HttpConnectionException $exception) { |
|
124 | if ($exception->getCode() == HttpConnectionException::ERROR_CODE_REQUEST_EXCEPTION || |
|
125 | $exception->getCode() == HttpConnectionException::ERROR_CODE_CONNECT_EXCEPTION |
|
126 | ) { |
|
127 | return false; |
|
128 | } |
|
129 | } |
|
130 | ||
131 | return true; |
|
132 | } |
|
133 | } |
|
134 |
@@ 87-99 (lines=13) @@ | ||
84 | * Returns true if the client can be connected to. |
|
85 | * @return bool |
|
86 | */ |
|
87 | public function ping() |
|
88 | { |
|
89 | try { |
|
90 | $this->httpClient->get('/v2/info'); |
|
91 | } catch (HttpConnectionException $exception) { |
|
92 | if ($exception->getCode() == HttpConnectionException::ERROR_CODE_REQUEST_EXCEPTION || |
|
93 | $exception->getCode() == HttpConnectionException::ERROR_CODE_CONNECT_EXCEPTION |
|
94 | ) { |
|
95 | return false; |
|
96 | } |
|
97 | } |
|
98 | return true; |
|
99 | } |
|
100 | } |
|
101 |