refactor health checks and prettify/lint

This commit is contained in:
wphan
2025-07-15 10:19:55 -07:00
parent 3cf7afe53e
commit d19e33e840
9 changed files with 171 additions and 111 deletions

View File

@@ -265,12 +265,9 @@ const main = async (): Promise<void> => {
}
};
app.get(
'/health',
handleHealthCheck(2 * WS_FALLBACK_FETCH_INTERVAL, dlobProvider)
);
app.get('/health', handleHealthCheck(dlobProvider));
app.get('/startup', handleStartup);
app.get('/', handleHealthCheck(2 * WS_FALLBACK_FETCH_INTERVAL, dlobProvider));
app.get('/', handleHealthCheck(dlobProvider));
app.get('/priorityFees', async (req, res, next) => {
try {
@@ -1065,4 +1062,4 @@ async function recursiveTryCatch(f: () => Promise<void>) {
recursiveTryCatch(() => main());
export { commitHash, driftClient, driftEnv, endpoint, sdkConfig, wsEndpoint };
export { commitHash, driftClient, driftEnv, endpoint, sdkConfig, wsEndpoint };