Skip to content

Commit

Permalink
feat: remove prisma health checks as not useful atm (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
mishraomp authored Feb 29, 2024
1 parent 49fa940 commit 357b331
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
15 changes: 4 additions & 11 deletions backend/src/health.controller.ts
Original file line number Diff line number Diff line change
@@ -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";
}
}
4 changes: 2 additions & 2 deletions backend/src/v1/tasks/task.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()

}
Expand Down

0 comments on commit 357b331

Please sign in to comment.