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

chore(repo): Simplify health indicators interface #5404

Merged
merged 3 commits into from Apr 30, 2024

Conversation

SokratisVidros
Copy link
Contributor

What change does this PR introduce?

Remove the isActive method from the IHealthIndicator interface, as it's currently not in use.

Why was this change needed?

Just a clean up to simplify things.

Remove isActive method as it's currently not in use.
Copy link

netlify bot commented Apr 12, 2024

Deploy Preview for dev-web-novu ready!

Name Link
🔨 Latest commit ae6b853
🔍 Latest deploy log https://app.netlify.com/sites/dev-web-novu/deploys/662b955e0ef728000858dec8
😎 Deploy Preview https://deploy-preview-5404--dev-web-novu.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Apr 12, 2024

Deploy Preview for novu-design ready!

Name Link
🔨 Latest commit ae6b853
🔍 Latest deploy log https://app.netlify.com/sites/novu-design/deploys/662b955ee6042c00088642ce
😎 Deploy Preview https://deploy-preview-5404--novu-design.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@djabarovgeorge
Copy link
Contributor

@SokratisVidros
I am afraid that we removed the isActive flag use during refactoring. If we would revert this change, it would allow us to verify if a service is healthy by checking if it's not paused as well.
Is this validation not needed anymore?

@SokratisVidros
Copy link
Contributor Author

SokratisVidros commented Apr 15, 2024

@djabarovgeorge, I couldn't find any usages for the current status of the code. Would taking into account the paused state of each queue in the isActive method address the concerns?

Copy link
Contributor

@djabarovgeorge djabarovgeorge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove the unused code since it's not relevant anymore. Looking at it again I think there might also be a flaw with the "is active" implementation anyway.

Here are a few things to consider:

  1. Previously, pm2 wouldn't stop the process if an error were thrown during startup. We fixed this by adding process.exit(1);, but I'm not sure if it's working as expected.
  2. I believe the health checks in ECS run for 10 minutes. This interval could be shortened if needed.

@SokratisVidros
Copy link
Contributor Author

@djabarovgeorge health check run every 10 seconds. Any other objections before merging this for now?

@djabarovgeorge
Copy link
Contributor

@SokratisVidros Let's merge it! :)

Sorry, I meant the worst-case scenario where the service is down, looking at it again looks like the health check could take up to 150 seconds, which seems more reasonable the 10 minutes.

@SokratisVidros SokratisVidros merged commit b5a9f63 into next Apr 30, 2024
30 checks passed
@SokratisVidros SokratisVidros deleted the simplify_health_indicator_interface branch April 30, 2024 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants