Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 4e31fe9

Browse files
committed
Add DEBUG_RSYNC env
1 parent c305b9d commit 4e31fe9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

internal/sync/sync.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,17 @@ func (s Sync) syncPaths(delete bool, local, remote string) error {
3838
self := os.Args[0]
3939

4040
args := []string{"-zz",
41-
"-a", "--progress",
41+
"-a",
4242
"--delete",
4343
"-e", self + " sh", local, s.Environment.Name + ":" + remote,
4444
}
4545
if delete {
4646
args = append([]string{"--delete"}, args...)
4747
}
48+
if os.Getenv("DEBUG_RSYNC") != "" {
49+
args = append([]string{"--progress"}, args...)
50+
}
51+
4852
// See https://unix.stackexchange.com/questions/188737/does-compression-option-z-with-rsync-speed-up-backup
4953
// on compression level.
5054
// (AB): compression sped up the initial sync of the enterprise repo by 30%, leading me to believe it's
@@ -228,8 +232,7 @@ func (s Sync) Run() error {
228232
return nil
229233
}
230234

231-
// This queue is twice as large as the max in flight so we can check when it's full reliably.
232-
events := make(chan notify.EventInfo, maxInflightInotify*2)
235+
events := make(chan notify.EventInfo, maxInflightInotify)
233236
// Set up a recursive watch.
234237
err = notify.Watch(path.Join(s.LocalDir, "..."), events, notify.All)
235238
if err != nil {

0 commit comments

Comments
 (0)