Skip to content

Commit 24e2307

Browse files
Undo changes of commit ed5a40d
1 parent c502781 commit 24e2307

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

src/services/HealthCheckService.js

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,23 @@
22
* Health Check Service
33
*/
44

5-
// const errors = require('common-errors')
6-
// const helper = require('../common/helper')
5+
const errors = require('common-errors')
6+
const helper = require('../common/helper')
77

88
/**
99
* Check if the elasticsearch connection is active
1010
*/
1111

1212
function * check () {
13-
// const esClient = helper.getEsClient()
13+
const esClient = helper.getEsClient()
1414

15-
// try {
16-
// yield esClient.ping({
17-
// requestTimeout: 10000
18-
// })
19-
20-
// } catch (e) {
21-
// throw new errors.HttpStatusError(503, 'Elasticsearch instance cannot be reached')
22-
// }
15+
try {
16+
yield esClient.ping({
17+
requestTimeout: 10000
18+
})
19+
} catch (e) {
20+
throw new errors.HttpStatusError(503, 'Elasticsearch instance cannot be reached')
21+
}
2322

2423
return {
2524
checksRun: 1

0 commit comments

Comments
 (0)