Skip to content
Snippets Groups Projects

make productfectcher use default threads capo property

Merged Charlotte Hausman requested to merge productfetcher_tweaks into main
Files
3
@@ -24,6 +24,8 @@ from pathlib import Path
from typing import List, Type
# pylint: disable=E0401, E0402, R0913
from pycapo import CapoConfig
from .exceptions import FetchError
from .fetcher_factory import ConfiguredFetcherFactory
from .fetchers import ForceMode
@@ -263,6 +265,8 @@ class FetchContext:
:return: an argparse 'parser' with command line options for productfetcher.
"""
default_threads = CapoConfig().settings("edu.nrao.workspaces.ProductFetcherSettings").defaultThreadsPerHost
parser = argparse.ArgumentParser(
description=_PROLOGUE,
formatter_class=argparse.RawTextHelpFormatter,
@@ -272,9 +276,9 @@ class FetchContext:
CLIParam.CONCURRENCY.value,
action="store",
dest="concurrency",
help="maxmimum threads per plan (set to 1 for no threading)",
help="maximum threads per plan (set to 1 for no threading)",
type=int,
default=16,
default=default_threads,
)
parser.add_argument(
Loading