Fix jwt-token
This commit is contained in:
21
data-retention-service/healthcheck.js
Normal file
21
data-retention-service/healthcheck.js
Normal file
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* Health check for Data Retention Service
|
||||
*/
|
||||
|
||||
const { getModels } = require('./database');
|
||||
|
||||
async function healthCheck() {
|
||||
try {
|
||||
// Check database connection
|
||||
const { Tenant } = await getModels();
|
||||
await Tenant.findOne({ limit: 1 });
|
||||
|
||||
console.log('Health check passed');
|
||||
process.exit(0);
|
||||
} catch (error) {
|
||||
console.error('Health check failed:', error);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
healthCheck();
|
||||
Reference in New Issue
Block a user