Skip to content

Commit e7820bb

Browse files
committed
healthcheck ping logs
1 parent a55dc8b commit e7820bb

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

backend/src/api/index.ts

+16-4
Original file line numberDiff line numberDiff line change
@@ -217,14 +217,26 @@ setImmediate(async () => {
217217
try {
218218
const [osPingRes, redisPingRes, dbPingRes, temporalPingRes] = await Promise.all([
219219
// ping opensearch
220-
opensearch.ping().then((res) => res.body),
220+
opensearch.ping().then((res) => {
221+
console.log('Pinged opensearch!')
222+
return res.body
223+
}),
221224
// ping redis,
222-
redis.ping().then((res) => res === 'PONG'),
225+
redis.ping().then((res) => {
226+
console.log('Pinged redis!')
227+
return res === 'PONG'
228+
}),
223229
// ping database
224-
seq.query('select 1', { type: QueryTypes.SELECT }).then((rows) => rows.length === 1),
230+
seq.query('select 1', { type: QueryTypes.SELECT }).then((rows) => {
231+
console.log('Pinged database!')
232+
return rows.length === 1
233+
}),
225234
// ping temporal
226235
req.temporal
227-
? (req.temporal as TemporalClient).workflowService.getSystemInfo({}).then(() => true)
236+
? (req.temporal as TemporalClient).workflowService.getSystemInfo({}).then(() => {
237+
console.log('Pinged temporal!')
238+
return true
239+
})
228240
: Promise.resolve(true),
229241
])
230242

0 commit comments

Comments
 (0)