-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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(NODE-4637): clean up async interval #3411
Conversation
@@ -386,7 +386,9 @@ export class Topology extends TypedEventEmitter<TopologyEvents> { | |||
} | |||
|
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.
The missing overloads in this file were revealed when I converted the monitor tests to TS. I'm happy to revert these changes and cast in the test file instead.
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.
It's internal I think it's fine.
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.
LGTM, barring some bikeshedding on slack
Description
What is changing?
This PR does a bit of cleanup on the async interval using in SDAM monitoring. Specifically it
makeInterruptibleAsyncInterval
factory function into a classSDAMMonitorInterval
(name can be workshopped).To aid in review, moved the interval to monitor.ts (and the associated tests) in the first commit, and then tried to be granular with the changes from then on. My intention was to put all the code reorganization changes in to the first commit, so the actual code changes that I made can be easily viewed in a diff.
Is there new documentation needed for these changes?
No.
What is the motivation for this change?
General code cleanup and better code organization.
Double check the following
npm run check:lint
script<type>(NODE-xxxx)<!>: <description>