dropunused: Support --jobs
Sponsored-by: Kevin Mueller on Patreon
This commit is contained in:
parent
33ba537728
commit
7f38355860
4 changed files with 13 additions and 2 deletions
|
@ -22,6 +22,7 @@ git-annex (10.20230627) UNRELEASED; urgency=medium
|
||||||
* S3: Allow setting publicurl=yes without public=yes, to support
|
* S3: Allow setting publicurl=yes without public=yes, to support
|
||||||
buckets that are configured with a Bucket Policy that allows public
|
buckets that are configured with a Bucket Policy that allows public
|
||||||
access.
|
access.
|
||||||
|
* dropunused: Support --jobs
|
||||||
|
|
||||||
-- Joey Hess <id@joeyh.name> Mon, 26 Jun 2023 13:10:40 -0400
|
-- Joey Hess <id@joeyh.name> Mon, 26 Jun 2023 13:10:40 -0400
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ import Annex.Content
|
||||||
import qualified Utility.RawFilePath as R
|
import qualified Utility.RawFilePath as R
|
||||||
|
|
||||||
cmd :: Command
|
cmd :: Command
|
||||||
cmd = withAnnexOptions [jsonOptions] $
|
cmd = withAnnexOptions [jobsOption, jsonOptions] $
|
||||||
command "dropunused" SectionMaintenance
|
command "dropunused" SectionMaintenance
|
||||||
"drop unused file content"
|
"drop unused file content"
|
||||||
(paramRepeating paramNumRange) (seek <$$> optParser)
|
(paramRepeating paramNumRange) (seek <$$> optParser)
|
||||||
|
@ -36,7 +36,7 @@ optParser desc = DropUnusedOptions
|
||||||
<*> optional (Command.Drop.parseDropFromOption)
|
<*> optional (Command.Drop.parseDropFromOption)
|
||||||
|
|
||||||
seek :: DropUnusedOptions -> CommandSeek
|
seek :: DropUnusedOptions -> CommandSeek
|
||||||
seek o = do
|
seek o = startConcurrency commandStages $ do
|
||||||
numcopies <- getNumCopies
|
numcopies <- getNumCopies
|
||||||
mincopies <- getMinCopies
|
mincopies <- getMinCopies
|
||||||
from <- maybe (pure Nothing) (Just <$$> getParsed) (dropFrom o)
|
from <- maybe (pure Nothing) (Just <$$> getParsed) (dropFrom o)
|
||||||
|
|
|
@ -28,6 +28,14 @@ Or, specify "all" to drop all unused data.
|
||||||
the last repository that is storing their content. Data loss can
|
the last repository that is storing their content. Data loss can
|
||||||
result from using this option.
|
result from using this option.
|
||||||
|
|
||||||
|
* `--jobs=N` `-JN`
|
||||||
|
|
||||||
|
Runs multiple drop jobs in parallel. This is particularly useful
|
||||||
|
when git-annex has to contact remotes to check if it can drop content.
|
||||||
|
For example: `-J4`
|
||||||
|
|
||||||
|
Setting this to "cpus" will run one job per CPU core.
|
||||||
|
|
||||||
* `--json`
|
* `--json`
|
||||||
|
|
||||||
Enable JSON output. This is intended to be parsed by programs that use
|
Enable JSON output. This is intended to be parsed by programs that use
|
||||||
|
|
|
@ -1 +1,3 @@
|
||||||
Simple "drop" have it, but no for "dropunused". Missed?
|
Simple "drop" have it, but no for "dropunused". Missed?
|
||||||
|
|
||||||
|
> [[fixed|done]] --[[Joey]]
|
||||||
|
|
Loading…
Reference in a new issue