X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/c86cfefc4813d275073fb5f2b196ddfcc7f26aef..5d32ac9ac918929c11602a740c3033bcfdb0f929:/nominatim/clicmd/add_data.py?ds=sidebyside diff --git a/nominatim/clicmd/add_data.py b/nominatim/clicmd/add_data.py index 95e95b0a..9f0d3118 100644 --- a/nominatim/clicmd/add_data.py +++ b/nominatim/clicmd/add_data.py @@ -3,6 +3,8 @@ Implementation of the 'add-data' subcommand. """ import logging +import psutil + # Do not repeat documentation of subcommand classes. # pylint: disable=C0111 # Using non-top-level imports to avoid eventually unused imports. @@ -59,7 +61,8 @@ class UpdateAddData: if args.tiger_data: tokenizer = tokenizer_factory.get_tokenizer_for_db(args.config) return tiger_data.add_tiger_data(args.tiger_data, - args.config, args.threads or 1, + args.config, + args.threads or psutil.cpu_count() or 1, tokenizer) osm2pgsql_params = args.osm2pgsql_options(default_cache=1000, default_threads=1)