@@ 127-143 (lines=17) @@ | ||
124 | * Returns true if the client can be connected to. |
|
125 | * @return bool |
|
126 | */ |
|
127 | public function ping() |
|
128 | { |
|
129 | try { |
|
130 | $this->oHttpClient->get('/scheduler/jobs'); |
|
131 | } catch (HttpConnectionException $e) |
|
132 | { |
|
133 | if ( |
|
134 | $e->getCode() == HttpConnectionException::ERROR_CODE_REQUEST_EXCEPTION || |
|
135 | $e->getCode() == HttpConnectionException::ERROR_CODE_CONNECT_EXCEPTION |
|
136 | ) |
|
137 | { |
|
138 | return false; |
|
139 | } |
|
140 | } |
|
141 | ||
142 | return true; |
|
143 | } |
|
144 | } |
@@ 90-105 (lines=16) @@ | ||
87 | * Returns true if the client can be connected to. |
|
88 | * @return bool |
|
89 | */ |
|
90 | public function ping() |
|
91 | { |
|
92 | try { |
|
93 | $this->oHttpClient->get('/v2/info'); |
|
94 | } catch (HttpConnectionException $e) |
|
95 | { |
|
96 | if ( |
|
97 | $e->getCode() == HttpConnectionException::ERROR_CODE_REQUEST_EXCEPTION || |
|
98 | $e->getCode() == HttpConnectionException::ERROR_CODE_CONNECT_EXCEPTION |
|
99 | ) |
|
100 | { |
|
101 | return false; |
|
102 | } |
|
103 | } |
|
104 | return true; |
|
105 | } |
|
106 | } |