Skip to content

Commit

Permalink
chore(): marked the public api in prisma health (#2292)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony133 authored Jun 17, 2023
1 parent 6eab9e6 commit 1978022
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/health-indicator/database/prisma.health.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ export interface PrismaClientPingCheckSettings {
timeout?: number;
}

/**
* The PrismaHealthIndicator contains health indicators
* which are used for health checks related to Prisma
*
* @publicApi
* @module TerminusModule
*/
export class PrismaHealthIndicator extends HealthIndicator {
constructor() {
super();
Expand Down Expand Up @@ -52,6 +59,14 @@ export class PrismaHealthIndicator extends HealthIndicator {
}
}

/**
* Checks if the Prisma responds in (default) 1000ms and
* returns a result object corresponding to the result
*
* @param key The key which will be used for the result object
* @param prismaClient PrismaClient
* @param options The options for the ping
*/
public async pingCheck(
key: string,
prismaClient: PrismaClient,
Expand Down

0 comments on commit 1978022

Please sign in to comment.