Skip to content

Conversation

jacklinke
Copy link

Update delete_expired method of ResultManager to use writable database.

Resolves #357

@auvipy auvipy self-requested a review January 17, 2023 08:48
Copy link
Member

@auvipy auvipy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you will need to update the tests as well

@auvipy auvipy closed this Feb 5, 2023
@auvipy auvipy reopened this Feb 5, 2023
Copy link
Member

@auvipy auvipy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add / update tests to make the CI green.

@@ -86,7 +89,7 @@ def get_all_expired(self, expires):

def delete_expired(self, expires):
"""Delete all expired results."""
with transaction.atomic(using=self.db):
with transaction.atomic(using=self.database_for_write()):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also resolve the merge conflict please?

@matmunn
Copy link

matmunn commented Mar 18, 2024

@jacklinke any joy on this one? I'm running into the same issue that you are

@AllexVeldman
Copy link
Contributor

Just as a heads-up, #427 also needs a testcase with a read-only connection (See my comment for a suggested approach: #427 (comment))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The delete_expired method of ResultManager sometimes selects read-only database
4 participants