diff --git a/backend/src/health.controller.ts b/backend/src/health.controller.ts index c58c3a83..37872b2c 100644 --- a/backend/src/health.controller.ts +++ b/backend/src/health.controller.ts @@ -1,19 +1,12 @@ -import { Controller, Get } from "@nestjs/common"; -import { HealthCheckService, HealthCheck, PrismaHealthIndicator } from "@nestjs/terminus"; -import { PrismaService } from "nestjs-prisma"; +import { Controller, Get } from '@nestjs/common' +import { HealthCheck, HealthCheckService, PrismaHealthIndicator } from '@nestjs/terminus' + @Controller("health") export class HealthController { - constructor( - private health: HealthCheckService, - private prisma: PrismaHealthIndicator, - private readonly prismaService: PrismaService, - ) {} @Get() @HealthCheck() check() { - return this.health.check([ - () => this.prisma.pingCheck('prisma', this.prismaService), - ]); + return "ok"; } } diff --git a/backend/src/v1/tasks/task.service.ts b/backend/src/v1/tasks/task.service.ts index 4d94bccd..3ad04372 100644 --- a/backend/src/v1/tasks/task.service.ts +++ b/backend/src/v1/tasks/task.service.ts @@ -10,9 +10,9 @@ export class TasksService { } - @Cron('0 0 0/4 * * *') + @Cron('0 0/5 * * * *') async refreshCache() { - logger.info('refresh cache every 4 hours') + logger.info('refresh cache every 5 minutes') await this.objectStoreService.getLatestOmrrDataFromObjectStore() }