File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change 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
1212function * 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
You can’t perform that action at this time.
0 commit comments