-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Refactor readiness service to receive indicator list #4908
Refactor readiness service to receive indicator list #4908
Conversation
attempt: i, | ||
message: `Some health indicator returned false when checking if queues are enabled ${i}/${retries}`, | ||
}, | ||
`Some health indicator returned false when checking if queues are enabled ${i}/${retries}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a small fix, looks like the new relic is not able to print messages of a warning log level, fixed it as a tmp solution.
const statuses = healths.map( | ||
(health: HealthIndicatorResult) => Object.values(health)[0].status | ||
); | ||
|
||
return healths.every((health) => !!health === true); | ||
return statuses.every((status: HealthIndicatorStatus) => status === 'up'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created this explicit check of the status.
The old way works now because we throw exceptions if the status false
, however, i would like to be explicit if possible.
…ing-the-service-instance-sw-health-indicator' into refactor-readiness-service-to-receive-indicator-list # Conflicts: # packages/application-generic/src/modules/queues.module.ts
…ing-the-service-instance-sw-health-indicator' into refactor-readiness-service-to-receive-indicator-list # Conflicts: # packages/application-generic/src/modules/queues.module.ts # packages/application-generic/src/services/readiness/readiness.service.ts
What change does this PR introduce?
In this PR we readiness service to receive an indicator list, it is a preparation so we could add readiness to the WS app.
Why was this change needed?
In order to make readiness service more modular.
Other information (Screenshots)