Attempt to fix bottlenecks and performance related to Facade#399
Open
MoralCode wants to merge 6 commits into
Open
Attempt to fix bottlenecks and performance related to Facade#399MoralCode wants to merge 6 commits into
MoralCode wants to merge 6 commits into
Conversation
| f"""UPDATE collection_status SET ml_status = '{CollectionState.PENDING.value}'""" | ||
| f""" WHERE ml_status = '{CollectionState.ERROR.value}' and ml_data_last_collected is NULL;""" | ||
|
|
||
| with DatabaseSession(logger, engine) as session: |
Contributor
Author
There was a problem hiding this comment.
yes i know this part of the code needs a rewrite
| @@ -2,6 +2,7 @@ | |||
| import logging | |||
| import random | |||
There was a problem hiding this comment.
[pylint] reported by reviewdog 🐶
W0611: Unused import random (unused-import)
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
5ffec47 to
4fe004e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR attempts to fix a couple non-normal conditions with regard to facade.
These two issues can combine to grind collection to a halt and waste significant resources.
This PR addresses these issues by:
This PR fixes #391
Notes for Reviewers
I still have yet to test this fully. itll probably be complicated to test
Signed commits
Generative AI disclosure
Please select one option:
If AI tools were used, please provide details below:
- What tools were used? Sonnet 4.6 Medium via Cursor
- How were these tools used? lots of back and forth to attempt to diagnose the general collection performance issues. Some AI code completion was used to write the code
- Did you review these outputs before submitting this PR? Yes, at all times I was making sure the AI tool's diagnosis was sensible given my knowledge of the code and all written code was looked at and understood by me.