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

Let Lazy Commits ignore API requests #11256

Open
xoxfaby opened this issue Mar 23, 2024 · 3 comments
Open

Let Lazy Commits ignore API requests #11256

xoxfaby opened this issue Mar 23, 2024 · 3 comments
Labels
enhancement Adding or requesting a new feature. undecided These features might not be implemented. Can be prioritized by sponsorship.

Comments

@xoxfaby
Copy link

xoxfaby commented Mar 23, 2024

Describe the problem

I'd love to utilize lazy commits to limit the amount of commits and how often changes have to be pushed upstream. The problem is, I use the API to let my app pull the latest translations on startup, resulting in API calls all the time, which triggers a commit, which renders lazy commits useless.

Describe the solution you would like

So I'd like to be able to either let the lazy commit logic ignore API calls or maybe allow commits to be pushed every hour?

Describe alternatives you have considered

My current alternative is that I added a custom task to push commits every hour, which limits how often the remote repo has to update, but it's obviously not ideal to have to do this and also it still leaves me with many commits.

Screenshots

No response

Additional context

No response

@nijel
Copy link
Member

nijel commented Mar 23, 2024

The only API operation which triggers commit is download (as documented at https://docs.weblate.org/en/latest/admin/continuous.html#lazy-commits). That is because Weblate needs to flush the changes from the database to the file, and a that point it commits it to the repository as well.

What probably could be added to the download API is a parameter that would download the currently present file instead of flushing pending changes by committing.

@xoxfaby
Copy link
Author

xoxfaby commented Mar 23, 2024

Yeah, that is the one endpoint I use. Since I need all the strings, I just download them if the file has changed. Would definitely love if this solution was an option, I could definitely use that.

@nijel nijel added enhancement Adding or requesting a new feature. undecided These features might not be implemented. Can be prioritized by sponsorship. labels Mar 24, 2024
@nijel nijel added this to To do in API improvements via automation Mar 24, 2024
Copy link

This issue has been put aside. It is currently unclear if it will ever be implemented as it seems to cover too narrow of a use case or doesn't seem to fit into Weblate.

Please try to clarify the use case or consider proposing something more generic to make it useful to more users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding or requesting a new feature. undecided These features might not be implemented. Can be prioritized by sponsorship.
Projects
Status: To do
Development

No branches or pull requests

2 participants