wagtail / wagtail-localize-git

Translate Wagtail content using a git repository and PO files
Other
6 stars 3 forks source link

Add sync retry mechanism #24

Closed zerolab closed 2 years ago

zerolab commented 2 years ago

This PR adds a simple retry mechanism to fix #19.

Use case:

  1. sync pulls data from remote.
  2. the remote is immediately updated (different head commit SHA)
  3. sync tries to push and fails as it gets rejected.

By pulling again we should be in a position to push again.

This is by no means a comprehensive in that it is possible to reach a state whereby when pulling on retry fails due to a need to merge. This will raise an exception and would require manual intervention.