Change healthchecker to return error
This commit is contained in:
@@ -126,8 +126,11 @@ func (s *PostgresStore) Stats(statType LoginStats, limit int) ([]StatsResult, er
|
||||
return results, nil
|
||||
}
|
||||
|
||||
func (s *PostgresStore) IsHealthy() bool {
|
||||
return s.db.Ping() == nil
|
||||
func (s *PostgresStore) IsHealthy() error {
|
||||
if err := s.db.Ping(); err != nil {
|
||||
return ErrStoreUnhealthy
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *PostgresStore) statsTotal(limit int) ([]StatsResult, error) {
|
||||
|
Reference in New Issue
Block a user