How to tell when synchronization is completely complete

I want use syncthing in my own golang agent project for file synchronization. How can I know when the syncronization fully complete. I tried to use /rest/db/completion api to check the response completion is or not 100.But sometimes wrong(completion is 100 but actually not finish).

Best is to use the event API to keep up with what’s going on. However, “completely complete” can only be known if you know what’s happening on the other side as well – things can only be in sync until they change again.

Thanks for your answer.

What I want to achieve is to start syncthing in my project and use the syncthing api to synchronize folders between multiple machines. At the same time, strong consistency needs to be achieved (when the source machine shares a folder with the destination machine, if there is a folder under the destination folder Files that do not exist in the source folder need to be deleted)

My steps are: first share the file, and then call the restdbcompletion api to continuously obtain the completion progress of the destination shared folder. When the destination folder progresses on all destination machines When both are 100, the source machine is notified to call the /rest/db/override api for forced coverage to achieve strong consistency.

But the problem now is: the progress on the destination machine is already 100, but the data in the folder has not been fully synchronized, and calling the /rest/db/override api has no effect.

What event api should I use?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.