Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove prisma health checks as not useful atm #41

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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