update<Fetch>: change auto fetch period to 10 minutes

This commit is contained in:
leo 2021-04-30 09:05:29 +08:00
parent 31253269aa
commit 5c4f36e4eb

View file

@ -48,7 +48,7 @@ namespace SourceGit.Commands {
public static void MarkFetched(string repo) { public static void MarkFetched(string repo) {
if (!jobs.ContainsKey(repo)) return; if (!jobs.ContainsKey(repo)) return;
jobs[repo].nextFetchPoint = DateTime.Now.AddMinutes(1).ToFileTime(); jobs[repo].nextFetchPoint = DateTime.Now.AddMinutes(10).ToFileTime();
} }
public static void Stop(string repo) { public static void Stop(string repo) {
@ -60,7 +60,7 @@ namespace SourceGit.Commands {
public AutoFetch(string repo) { public AutoFetch(string repo) {
cmd = new Fetch(repo, "--all", true, null); cmd = new Fetch(repo, "--all", true, null);
nextFetchPoint = DateTime.Now.AddMinutes(1).ToFileTime(); nextFetchPoint = DateTime.Now.AddMinutes(10).ToFileTime();
timer = new Timer(OnTick, null, 60000, 10000); timer = new Timer(OnTick, null, 60000, 10000);
} }
@ -70,7 +70,7 @@ namespace SourceGit.Commands {
Models.Watcher.SetEnabled(cmd.Cwd, false); Models.Watcher.SetEnabled(cmd.Cwd, false);
cmd.Exec(); cmd.Exec();
nextFetchPoint = DateTime.Now.AddMinutes(1).ToFileTime(); nextFetchPoint = DateTime.Now.AddMinutes(10).ToFileTime();
Models.Watcher.SetEnabled(cmd.Cwd, true); Models.Watcher.SetEnabled(cmd.Cwd, true);
} }
} }