From 9800c58c145c895c91f90a0cd0dff1825e6e73f0 Mon Sep 17 00:00:00 2001 From: Nicolas F Date: Fri, 27 Dec 2019 15:32:10 +0100 Subject: [PATCH] genpoi: add -p/--processes option for parity People could always set this through the config file, but somehow not the command line. This commit fixes this oddity by adding the option to the genPOI script's argument parser. --- overviewer_core/aux_files/genPOI.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/overviewer_core/aux_files/genPOI.py b/overviewer_core/aux_files/genPOI.py index 4b01268..655872f 100755 --- a/overviewer_core/aux_files/genPOI.py +++ b/overviewer_core/aux_files/genPOI.py @@ -447,6 +447,9 @@ def main(): parser = ArgumentParser(prog=prog_name) parser.add_argument("-c", "--config", dest="config", action="store", required=True, help="Specify the config file to use.") + parser.add_argument("-p", "--processes", dest="procs", action="store", type=int, + help="The number of local worker processes to spawn. Defaults to the " + "number of CPU cores your computer has.") parser.add_argument("-q", "--quiet", dest="quiet", action="count", help="Reduce logging output") parser.add_argument("--skip-scan", dest="skipscan", action="store_true", @@ -465,6 +468,8 @@ def main(): mw_parser.parse(args.config) except config_parser.MissingConfigException: parser.error("The configuration file '{}' does not exist.".format(args.config)) + if args.procs: + mw_parser.set_config_item("processes", args.procs) try: config = mw_parser.get_validated_config() except Exception: