Files
drone-detector/data-retention-service/healthcheck.js
2025-09-23 13:55:10 +02:00

21 lines
430 B
JavaScript

/**
* 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();