From 18cd8bf43ae7772e32ac3562eac3a00929548830 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 24 Aug 2024 09:37:24 -0400 Subject: [PATCH] punt on LiveUpdate plumbing through assistant for now --- Assistant/Threads/Committer.hs | 4 ++-- Assistant/Threads/TransferScanner.hs | 4 ++-- doc/todo/git-annex_proxies.mdwn | 8 ++++++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Assistant/Threads/Committer.hs b/Assistant/Threads/Committer.hs index 229ad17d1a..2f7e03c43c 100644 --- a/Assistant/Threads/Committer.hs +++ b/Assistant/Threads/Committer.hs @@ -322,7 +322,7 @@ handleAdds lockdowndir havelsof largefilematcher annexdotfiles delayadd cs = ret | not annexdotfiles && dotfile f = return (Right change) | otherwise = - ifM (liftAnnex $ checkFileMatcher largefilematcher f) + ifM (liftAnnex $ checkFileMatcher NoLiveUpdate largefilematcher f) ( return (Left change) , return (Right change) ) @@ -395,7 +395,7 @@ handleAdds lockdowndir havelsof largefilematcher annexdotfiles delayadd cs = ret return Nothing done change file key = liftAnnex $ do - logStatus key InfoPresent + logStatus NoLiveUpdate key InfoPresent mode <- liftIO $ catchMaybeIO $ fileMode <$> R.getFileStatus (toRawFilePath file) stagePointerFile (toRawFilePath file) mode =<< hashPointerFile key showEndOk diff --git a/Assistant/Threads/TransferScanner.hs b/Assistant/Threads/TransferScanner.hs index 970516a380..230194cb2c 100644 --- a/Assistant/Threads/TransferScanner.hs +++ b/Assistant/Threads/TransferScanner.hs @@ -171,9 +171,9 @@ expensiveScan urlrenderer rs = batch <~> do "expensive scan found too many copies of object" present key af (SeekInput []) [] callCommandAction ts <- if present - then liftAnnex . filterM (wantGetBy True (Just key) af . Remote.uuid . fst) + then liftAnnex . filterM (wantGetBy NoLiveUpdate True (Just key) af . Remote.uuid . fst) =<< use syncDataRemotes (genTransfer Upload False) - else ifM (liftAnnex $ wantGet True (Just key) af) + else ifM (liftAnnex $ wantGet NoLiveUpdate True (Just key) af) ( use downloadRemotes (genTransfer Download True) , return [] ) let unwanted' = S.difference unwanted slocs return (unwanted', ts) diff --git a/doc/todo/git-annex_proxies.mdwn b/doc/todo/git-annex_proxies.mdwn index 0ab04b1e47..f7b9fc53e7 100644 --- a/doc/todo/git-annex_proxies.mdwn +++ b/doc/todo/git-annex_proxies.mdwn @@ -142,11 +142,15 @@ Planned schedule of work: also be done by just repeatedly touching a file named with the processes's pid in it, to avoid sqlite overhead. +* Check for TODO XXX markers + * Check all uses of NoLiveUpdate to see if a live update can be started and performed there. There is one in Annex.Cluster in particular that needs a - live update + live update. -* Check for TODO XXX markers +* The assistant is using NoLiveUpdate, but it should be posssible to plumb + a LiveUpdate through it from preferred content checking to location log + updating. * `git-annex info` in the limitedcalc path in cachedAllRepoData double-counts redundant information from the journal due to using