Skip to content

Commit

Permalink
feat: ✨ app: add healthcheck cron to indexer
Browse files Browse the repository at this point in the history
  • Loading branch information
JesseTheRobot committed Dec 18, 2023
1 parent 8f5a2fa commit aed9d78
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit aed9d78

Please sign in to comment.