annex.jobs=cpus etc

Added the ability to run one job per CPU (core), by setting annex.jobs=cpus,
or using option --jobs=cpus or -Jcpus.

Built with future expansion in mind, including not defaulting matching on
Concurrency so more constructors can later be added, and using "cpu"
instead of "0".
This commit is contained in:
Joey Hess 2019-05-10 13:24:31 -04:00
parent 459bbd9005
commit 82186ca58f
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
20 changed files with 105 additions and 32 deletions

View file

@ -177,7 +177,8 @@ extractGitConfig r = GitConfig
, annexAllowUnverifiedDownloads = (== Just "ACKTHPPT") $
getmaybe (annex "security.allow-unverified-downloads")
, annexMaxExtensionLength = getmayberead (annex "maxextensionlength")
, annexJobs = maybe NonConcurrent Concurrent $ getmayberead (annex "jobs")
, annexJobs = fromMaybe NonConcurrent $
parseConcurrency =<< getmaybe (annex "jobs")
, annexCacheCreds = getbool (annex "cachecreds") True
, coreSymlinks = getbool "core.symlinks" True
, coreSharedRepository = getSharedRepository r