-
-
Notifications
You must be signed in to change notification settings - Fork 147
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
FIx Finding Housekeeping Candidates and Modify Housekeeping Structure #749
Conversation
…ircular in mongodb
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #749 +/- ##
==========================================
+ Coverage 49.30% 49.35% +0.04%
==========================================
Files 69 69
Lines 10094 10113 +19
==========================================
+ Hits 4977 4991 +14
- Misses 4601 4606 +5
Partials 516 516 ☔ View full report in Codecov by Sentry. |
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.
I'm curious if there are ways to leverage the features of the Go language to further improve the code in a cleaner way.
I can't think of anything beyond what you've written, other than using a for statement to
simply code (maybe?) or refactoring redundant querying codes. I didn't find any syntax for circular queries in MongoDB either.
We can temporary apply this changes to fix urgent error, and then consider housekeeping service structure to improve overall housekeeping structure & performance.
Any ideas? @hackerwins
c06536d
to
ce1ad89
Compare
I'm unfamiliar with Go lang, and I had concerns about whether the code could be simplified using techniques specific to the language. Thank you. |
…ingProjectInfos`
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.
Can you request review after you open this PR? It seems like this is still in progress.
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.
Thank you for your contribution.
Refactored housekeeping service structure & test looks better than before 👍🏼
I have requested few convention-related changes.
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.
@devleejb
initializing on top of the test function looks better than
This function can be only used for housekeeping purposes, and cannot normalize more. So I think name |
d118639
to
6ad2ca3
Compare
What this PR does / why we need it:
FindDeactivateCandidates
function, moving it from the Database Layer to the Service LayerlistProjectInfos
toFindNextNCyclingProjectInfos
FindNextNCyclingProjectInfos
function to retrieve a cyclic list of N projects with IDs greater than lastProjectIDFindDeactivateCandidatesPerProject
for memdb to return candidates of only one projectWhich issue(s) this PR fixes:
Fixes # #744
Special notes for your reviewer:
FindDeactivateCandidatesPerProject
in the Database Layer. Seeking opinions on whether it would be appropriate to rename it to something unrelated to Housekeeping.Does this PR introduce a user-facing change?:
Additional documentation:
Checklist: