Skip to content

Commit

Permalink
ignore datalake connection for now
Browse files Browse the repository at this point in the history
  • Loading branch information
wheelsandcogs committed Sep 10, 2024
1 parent c15a82f commit 047dc88
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/route/healthcheck.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { Router } from 'express';
import passport from 'passport';

import { logger } from '../utils/logger';
import { DataLakeService } from '../controllers/datalake';
// import { logger } from '../utils/logger';
// import { DataLakeService } from '../controllers/datalake';
import { sanitiseUser } from '../utils/sanitise-user';
import { User } from '../entities/user';

const dataLakeService = new DataLakeService();
const healthcheck = Router();

healthcheck.get('/basic', (req, res) => {
Expand All @@ -17,15 +16,16 @@ healthcheck.get('/jwt', passport.authenticate('jwt', { session: false }), (req,
res.json({ message: 'success', user: sanitiseUser(req.user as User) });
});

healthcheck.get('/datalake', (req, res) => {
try {
dataLakeService.listFiles();
} catch (err) {
logger.error(`Unable to connect to datalake: ${err}`);
res.status(500).json({ message: 'error' });
return;
}
res.json({ message: 'success' });
});
// healthcheck.get('/datalake', (req, res) => {
// const dataLakeService = new DataLakeService();
// try {
// dataLakeService.listFiles();
// } catch (err) {
// logger.error(`Unable to connect to datalake: ${err}`);
// res.status(500).json({ message: 'error' });
// return;
// }
// res.json({ message: 'success' });
// });

export const healthcheckRouter = healthcheck;

0 comments on commit 047dc88

Please sign in to comment.