-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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: create middleware to handle dbWatchersDisabled check #32721
Conversation
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #32721 +/- ##
===========================================
+ Coverage 50.60% 56.81% +6.21%
===========================================
Files 1950 2498 +548
Lines 46689 55335 +8646
Branches 9489 11411 +1922
===========================================
+ Hits 23627 31441 +7814
- Misses 20933 21187 +254
- Partials 2129 2707 +578
Flags with carried forward coverage won't be shown. Click here to find out more. |
810efe7
to
6861c00
Compare
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.
Liked a bit more the 1st approach 😢
But this looks nice as well!
This refactor introduces a middleware function,
withDbWatcherCheck
, to handle thedbWatchersDisabled
check uniformly across various notification functions. By applying this middleware, we ensure that the flag checks are consistently managed, reducing redundancy and potential errors.The primary changes involve:
withDbWatcherCheck
middleware to wrap notification functions.withDbWatcherCheck
wrapper applied.