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

Refactor readiness service to receive indicator list #4908

Merged

Conversation

djabarovgeorge
Copy link
Contributor

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)

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}`,
Copy link
Contributor Author

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.

Comment on lines 57 to 61
const statuses = healths.map(
(health: HealthIndicatorResult) => Object.values(health)[0].status
);

return healths.every((health) => !!health === true);
return statuses.every((status: HealthIndicatorStatus) => status === 'up');
Copy link
Contributor Author

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
Base automatically changed from nv-3202-race-condition-when-reading-the-service-instance-sw-health-indicator to next December 4, 2023 14:34
@djabarovgeorge djabarovgeorge merged commit 1df267c into next Dec 5, 2023
26 checks passed
@djabarovgeorge djabarovgeorge deleted the refactor-readiness-service-to-receive-indicator-list branch December 5, 2023 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants