Skip to content

healthchek mechanism based on DB connection #71

@ronenkapelian

Description

@ronenkapelian

Service health check mechanism
Service that includes connection to DB should depend on his healthcheck interval checking based on DB connection

Good reference on how it should implemented:

based on auth-manager

const healthCheck = (connection: DataSource): HealthCheck => {
  return async (): Promise<void> => {
    const check = connection.query('SELECT 1').then(() => {
      return;
    });
    return promiseTimeout<void>(DB_CONNECTION_TIMEOUT, check);
  };
};

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions