-
Notifications
You must be signed in to change notification settings - Fork 1.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
feat: update retry methods and queries on sql repository #1320
Conversation
a80efd9
to
fcb17da
Compare
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
query = self.table.select().filter_by(id=entity_id).order_by(text("updated_at DESC")) | ||
|
||
for _ in range(self.MAX_MODEL_NOT_FOUND_RETRY): | ||
if entry := self.db.execute(str(query.compile(dialect=sqlite.dialect())), [entity_id]).fetchall(): |
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 behavior we want is to have at most one element returned by this query.
We should at least log a warning if it is not the case.
To investigate why, maybe we can exit as well.
fcb17da
to
26f7a7f
Compare
IndexError, | ||
StopIteration, | ||
) | ||
MAX_MODEL_NOT_FOUND_RETRY = 30 |
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.
Isn't it too much? Or is it for debugging and investigation purpose?
@jrobinAV I think Im not gonna merge this PR while we discuss about removing sql. |
All right. Sounds fair. |
Since we decided to remove the sql option for repository type, should we close the PR and delete the branch ? |
Closing this since we decided to remove SQL Repository |
No description provided.