optimisation for borg
Skip needing to list importable contents when unchanged since last time.
This commit is contained in:
parent
e1ac42be77
commit
4f9969d0a1
9 changed files with 32 additions and 21 deletions
|
@ -660,12 +660,15 @@ makeImportMatcher r = load preferredContentKeylessTokens >>= \case
|
|||
- would delete the files.
|
||||
-
|
||||
- Throws exception if unable to contact the remote.
|
||||
- Returns Nothing when there is no change since last time.
|
||||
-}
|
||||
getImportableContents :: Remote -> ImportTreeConfig -> CheckGitIgnore -> FileMatcher Annex -> Annex (ImportableContents (ContentIdentifier, ByteSize))
|
||||
getImportableContents :: Remote -> ImportTreeConfig -> CheckGitIgnore -> FileMatcher Annex -> Annex (Maybe (ImportableContents (ContentIdentifier, ByteSize)))
|
||||
getImportableContents r importtreeconfig ci matcher = do
|
||||
importable <- Remote.listImportableContents (Remote.importActions r)
|
||||
dbhandle <- Export.openDb (Remote.uuid r)
|
||||
filterunwanted dbhandle importable
|
||||
Remote.listImportableContents (Remote.importActions r) >>= \case
|
||||
Just importable -> do
|
||||
dbhandle <- Export.openDb (Remote.uuid r)
|
||||
Just <$> filterunwanted dbhandle importable
|
||||
Nothing -> return Nothing
|
||||
where
|
||||
filterunwanted dbhandle ic = ImportableContents
|
||||
<$> filterM (wanted dbhandle) (importableContents ic)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue