Skip to content

Commit

Permalink
remove "--contimeout=120" from default rsync options
Browse files Browse the repository at this point in the history
  • Loading branch information
zyx committed Mar 16, 2020
1 parent c99916c commit aee1a70
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions worker/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ exit 0
fmt.Sprintf(
"-aHvh --no-o --no-g --stats --exclude .~tmp~/ "+
"--delete --delete-after --delay-updates --safe-links "+
"--timeout=120 --contimeout=120 -6 %s %s",
"--timeout=120 -6 %s %s",
provider.upstreamURL, provider.WorkingDir(),
),
)
Expand Down Expand Up @@ -160,7 +160,7 @@ exit 0
fmt.Sprintf(
"%s %s %s -aHvh --no-o --no-g --stats --exclude .~tmp~/ "+
"--delete --delete-after --delay-updates --safe-links "+
"--timeout=120 --contimeout=120 -4 --delete-excluded %s %s",
"--timeout=120 -4 --delete-excluded %s %s",
provider.username, provider.password, proxyAddr,
provider.upstreamURL, provider.WorkingDir(),
),
Expand Down Expand Up @@ -460,15 +460,15 @@ exit 0
targetDir,
fmt.Sprintf(
"-aHvh --no-o --no-g --stats --exclude .~tmp~/ --safe-links "+
"--timeout=120 --contimeout=120 --exclude dists/ -6 "+
"--timeout=120 --exclude dists/ -6 "+
"--exclude-from %s %s %s",
provider.excludeFile, provider.upstreamURL, provider.WorkingDir(),
),
targetDir,
fmt.Sprintf(
"-aHvh --no-o --no-g --stats --exclude .~tmp~/ "+
"--delete --delete-after --delay-updates --safe-links "+
"--timeout=120 --contimeout=120 --delete-excluded --cache -6 --exclude-from %s %s %s",
"--timeout=120 --delete-excluded --cache -6 --exclude-from %s %s %s",
provider.excludeFile, provider.upstreamURL, provider.WorkingDir(),
),
)
Expand Down Expand Up @@ -499,7 +499,7 @@ exit 0

expectedOutput := fmt.Sprintf(
"-aHvh --no-o --no-g --stats --exclude .~tmp~/ --safe-links "+
"--timeout=120 --contimeout=120 --exclude dists/ -6 "+
"--timeout=120 --exclude dists/ -6 "+
"--exclude-from %s %s %s\n",
provider.excludeFile, provider.upstreamURL, provider.WorkingDir(),
)
Expand Down
2 changes: 1 addition & 1 deletion worker/rsync_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func newRsyncProvider(c rsyncConfig) (*rsyncProvider, error) {
"-aHvh", "--no-o", "--no-g", "--stats",
"--exclude", ".~tmp~/",
"--delete", "--delete-after", "--delay-updates",
"--safe-links", "--timeout=120", "--contimeout=120",
"--safe-links", "--timeout=120",
}
if c.overriddenOptions != nil {
options = c.overriddenOptions
Expand Down
4 changes: 2 additions & 2 deletions worker/two_stage_rsync_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ func newTwoStageRsyncProvider(c twoStageRsyncConfig) (*twoStageRsyncProvider, er
stage1Options: []string{
"-aHvh", "--no-o", "--no-g", "--stats",
"--exclude", ".~tmp~/",
"--safe-links", "--timeout=120", "--contimeout=120",
"--safe-links", "--timeout=120",
},
stage2Options: []string{
"-aHvh", "--no-o", "--no-g", "--stats",
"--exclude", ".~tmp~/",
"--delete", "--delete-after", "--delay-updates",
"--safe-links", "--timeout=120", "--contimeout=120",
"--safe-links", "--timeout=120",
},
}

Expand Down

0 comments on commit aee1a70

Please sign in to comment.