From bb85af1031b9946abc7c3a6c5040e8c9a02be881 Mon Sep 17 00:00:00 2001
From: Richard Petersen <richard.petersen@open-xchange.com>
Date: Tue, 7 Sep 2021 12:19:55 +0200
Subject: [PATCH] Fix readiness and liveness endpoints

---
 src/createApp.js | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/src/createApp.js b/src/createApp.js
index 386f777..2688855 100644
--- a/src/createApp.js
+++ b/src/createApp.js
@@ -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 = []
-- 
GitLab