Skip to content
Snippets Groups Projects
Commit bb85af10 authored by richard.petersen's avatar richard.petersen :sailboat:
Browse files

Fix readiness and liveness endpoints

parent 6bc3dfc4
No related branches found
No related tags found
No related merge requests found
......@@ -42,17 +42,6 @@ module.exports = () => {
app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerDocument))
app.use('/swagger.json', (req, res) => res.json(swaggerDocument))
const isReady = async () => {
await fetchManifest()
if (manifestCache.length === 0) throw new Error('No manifests found.')
}
const readinessCheck = new health.ReadinessCheck('readinessCheck', isReady)
healthCheck.registerReadinessCheck(readinessCheck)
const livenessCheck = new health.LivenessCheck('livenessCheck', isReady)
healthCheck.registerLivenessCheck(livenessCheck)
const urls = yaml.load(fs.readFileSync('./config/manifests/urls.yaml', 'utf8')).manifests
let manifestCache = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment