From be581a2722e78f8a2e59e5ca78a1090efc432307 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 27 Oct 2013 16:42:13 -0400 Subject: automatically launch git repository repair Added a RemoteChecker thread, that waits for problems to be reported with remotes, and checks if their git repository is in need of repair. Currently, only failures to sync with the remote cause a problem to be reported. This seems enough, but we'll see. Plugging in a removable drive with a repository on it that is corrupted does automatically repair the repository, as long as the corruption causes git push or git pull to fail. Some types of corruption do not, eg missing/corrupt objects for blobs that git push doesn't need to look at. So, this is not really a replacement for scheduled git repository fscking. But it does make the assistant more robust. This commit is sponsored by Fernando Jimenez. --- Assistant.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Assistant.hs') diff --git a/Assistant.hs b/Assistant.hs index 5eeba818e..8ae779714 100644 --- a/Assistant.hs +++ b/Assistant.hs @@ -23,6 +23,7 @@ import Assistant.Threads.TransferWatcher import Assistant.Threads.Transferrer import Assistant.Threads.SanityChecker import Assistant.Threads.Cronner +import Assistant.Threads.RemoteChecker #ifdef WITH_CLIBS import Assistant.Threads.MountWatcher #endif @@ -129,6 +130,7 @@ startDaemon assistant foreground startdelay listenhost startbrowser = do , assist $ daemonStatusThread , assist $ sanityCheckerDailyThread , assist $ sanityCheckerHourlyThread + , assist $ remoteCheckerThread urlrenderer #ifdef WITH_CLIBS , assist $ mountWatcherThread #endif -- cgit v1.2.3