From c1d4d77216740d4317fc7fbc4dad017a2093476f Mon Sep 17 00:00:00 2001 From: Kyle Zhu Date: Fri, 24 Apr 2020 15:21:09 -0400 Subject: [PATCH] Relax wait between sync --- README.md | 2 +- cmd/git-sync/main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a3c125f..7c8c4f2 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ docker run -d \ | GIT_SYNC_DEPTH | `--depth` | use a shallow clone with a history truncated to the specified number of commits | 0 | | GIT_SYNC_ROOT | `--root` | the root directory for git-sync operations, under which --dest will be created | "$HOME/git" | | GIT_SYNC_DEST | `--dest` | the name of (a symlink to) a directory in which to check-out files under --root (defaults to the leaf dir of --repo) | "" | -| GIT_SYNC_WAIT | `--wait` | the number of seconds between syncs | 0 | +| GIT_SYNC_WAIT | `--wait` | the number of seconds between syncs | 3 (seconds) | | GIT_SYNC_TIMEOUT | `--timeout` | the max number of seconds allowed for a complete sync | 120 | | GIT_SYNC_ONE_TIME | `--one-time` | exit after the first sync | false | | GIT_SYNC_MAX_SYNC_FAILURES | `--max-sync-failures` | the number of consecutive failures allowed before aborting (the first sync must succeed, -1 will retry forever after the initial sync) | 0 | diff --git a/cmd/git-sync/main.go b/cmd/git-sync/main.go index 6c8648d..7128333 100644 --- a/cmd/git-sync/main.go +++ b/cmd/git-sync/main.go @@ -59,7 +59,7 @@ var flRoot = flag.String("root", envString("GIT_SYNC_ROOT", envString("HOME", "" "the root directory for git-sync operations, under which --dest will be created") var flDest = flag.String("dest", envString("GIT_SYNC_DEST", ""), "the name of (a symlink to) a directory in which to check-out files under --root (defaults to the leaf dir of --repo)") -var flWait = flag.Float64("wait", envFloat("GIT_SYNC_WAIT", 0), +var flWait = flag.Float64("wait", envFloat("GIT_SYNC_WAIT", 3), "the number of seconds between syncs") var flSyncTimeout = flag.Int("timeout", envInt("GIT_SYNC_TIMEOUT", 120), "the max number of seconds allowed for a complete sync")