Skip to content

Run sync in a loop #4675

Description

@tomasMizera

Following https://github.com/MerginMaps/product/issues/83, let's introduce the sync loop

local_changes = true

while (local changes):
    pull_project()
    push_state = push_project()
    
    if push_state == success:
        local_changes = get_remaining_changes()
        clear retry counter
    else if push_state is error, but can be retried:
        sleep()
        increment retry counter
    else (push_state can not be retried || I have retried max times)
        break

Acceptance criteria:

  • On "Somebody else is syncing" error, the app retries to sync
  • Sync works as before

Metadata

Metadata

Assignees

Labels

enhancementPRIMARY CATEGORYsyncIntegration with Mergin Maps backend

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions