From 5c4f36e4ebec4041688b0fe7b7d4971cd6cb0d81 Mon Sep 17 00:00:00 2001 From: leo Date: Fri, 30 Apr 2021 09:05:29 +0800 Subject: [PATCH] update: change auto fetch period to 10 minutes --- src/Commands/Fetch.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Commands/Fetch.cs b/src/Commands/Fetch.cs index 2eeeacee..903c5372 100644 --- a/src/Commands/Fetch.cs +++ b/src/Commands/Fetch.cs @@ -48,7 +48,7 @@ namespace SourceGit.Commands { public static void MarkFetched(string repo) { 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) { @@ -60,7 +60,7 @@ namespace SourceGit.Commands { public AutoFetch(string repo) { 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); } @@ -70,7 +70,7 @@ namespace SourceGit.Commands { Models.Watcher.SetEnabled(cmd.Cwd, false); cmd.Exec(); - nextFetchPoint = DateTime.Now.AddMinutes(1).ToFileTime(); + nextFetchPoint = DateTime.Now.AddMinutes(10).ToFileTime(); Models.Watcher.SetEnabled(cmd.Cwd, true); } }