diff --git a/src/app.ts b/src/app.ts index 729d9f7..3cee18e 100644 --- a/src/app.ts +++ b/src/app.ts @@ -26,11 +26,15 @@ import { dataRouter } from './routes/data/index.js'; import { apolloServer } from './routes/graphql/index.js'; import { openApiRouter } from './routes/openapi.js'; import * as system from './system.js'; +import { createCron } from './utils/cron.js'; +import { runHealthCheck } from './utils/healthcheck.js'; system.arweaveClient.refreshPeers(); system.headerFsCacheCleanupWorker?.start(); +createCron('Healthchecks', '0 */1 * * * *', runHealthCheck); + // Allow starting without writers to support SQLite replication if (config.START_WRITERS) { system.blockImporter.start();