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

[Feature Request] Make auto-retry toggleable #105

Closed
Bikatr7 opened this issue May 8, 2024 · 3 comments
Closed

[Feature Request] Make auto-retry toggleable #105

Bikatr7 opened this issue May 8, 2024 · 3 comments

Comments

@Bikatr7
Copy link

Bikatr7 commented May 8, 2024

Hello!

I was wondering if you guys could add a way to toggle the auto-retry when translating

I know of course that this is best practice, but I have a use case for when I'd like to add my own decorator, instead of the one already provided (custom retrying, logging, different timing etc.). And currently doing that seems to cause conflicts.

I don't really have the time right now to look into how to properly implement this myself, so I wish to request this feature.

Thanks.

@JanEbbing
Copy link
Member

Hi, you should be able to do this by setting deepl.http_client.max_network_retries = 0 after importing deepl and before using the Translator. Please see the section "Configure automatic retries" in the README.md

@Bikatr7
Copy link
Author

Bikatr7 commented May 9, 2024

Oops. I had incorrectly assumed it wasn't possible. My apologies.

@JanEbbing
Copy link
Member

No worries, please let me know if you encounter any issues :)

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

No branches or pull requests

2 participants