syncthing / syncthing/syncthing

A command to wait for sync

Open
#7,849 2 comments 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
88.8k
Forks
5.5k
Avg merge
2d 10h
Merged PRs (30d)
5

Description

I would like a command that blocks until the current folder is fully synchronized.

Why? I have a directory on my "local" machine with my data and my remote computer that I ssh into, which processes the data. Sometimes I make a small change to the data and want to process it. Let's say I process the data with make. Right now, if I make a small change locally and then immediately type in make, my remote server won't see the changes for several seconds, which means I don't know what I'm making.

So, instead of typing in make on my local server, I type in something like syncthing sync && make

  • syncthing sync immediately fails if all of my remotes are not connected
  • Then it makes sure that the synchronization is complete, which means that local and remote servers have detected and transferred all changes
  • syncthing exits (no error code), which means that the files match the remote files.
  • make is now sure to complete properly

There are no alternatives other than waiting, and there's no way to know how long to wait.

I write this like "syncthing sync" verifies that all files are synced the syncthing folder that $PWD is contained in, it could alternately be all syncthing folders that are "mounted" on the local machine.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the proposed syncthing sync command and trace how the current folder, remote connections, and synchronization state are exposed. Clarify the folder scope and failure behavior described in the issue, then verify that the command waits for detected and transferred changes before make runs.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.