Skip to content
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

[BUG] buckets.delete_ids causes retryerror #132

Closed
odarotto opened this issue Oct 18, 2024 · 0 comments · Fixed by #133
Closed

[BUG] buckets.delete_ids causes retryerror #132

odarotto opened this issue Oct 18, 2024 · 0 comments · Fixed by #133
Assignees

Comments

@odarotto
Copy link
Collaborator

odarotto commented Oct 18, 2024

The delete_ids function has the @Retry decorator:

@retry(wait=wait_random(min=0.1, max=2), stop=(stop_after_delay(30)))
    def delete_ids(self, ids: List[str]) -> bool:
        """Delete works from the buckets backend with the given ids.

        Args:
            ids (List[str]): The IDs of the works to delete.

        Returns:
            bool: Whether the works were deleted successfully.
        """
        with self.session as session:
            response: Response = session.delete(
                url=f"{self.baseurl}/work", params={"ids": ids}
            )
            response.raise_for_status()
        return response.json()

When handling more than 100 works, it raises RetryError exception.

@odarotto odarotto self-assigned this Oct 18, 2024
@Afrokk Afrokk self-assigned this Oct 18, 2024
@odarotto odarotto linked a pull request Oct 18, 2024 that will close this issue
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 a pull request may close this issue.

2 participants