From 47f32fb189d87bdfdb264a368fb6da549063e5eb Mon Sep 17 00:00:00 2001 From: Sean Whalen Date: Sun, 24 Feb 2019 22:42:43 -0500 Subject: [PATCH] 6.2.0 --- README.rst | 4 ++-- docs/index.rst | 2 ++ parsedmarc/cli.py | 8 ++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index 8685ee8..9ee9604 100644 --- a/README.rst +++ b/README.rst @@ -138,8 +138,8 @@ The full set of configuration options are: - ``debug`` - bool: Print debugging messages - ``silent`` - bool: Only print errors (Default: True) - ``log_file`` - str: Write log messages to a file at this path - - ``n_procs`` - str: Number of process to run in parallel when parsing in CLI mode (Default: 1) - - ``chunksize`` - str: Number of files to give to each process when running in parallel. Setting this to a number larger than one can improve performance when processing thousands of files + - ``n_procs`` - int: Number of process to run in parallel when parsing in CLI mode (Default: 1) + - ``chunk_size`` - int: Number of files to give to each process when running in parallel. Setting this to a number larger than one can improve performance when processing thousands of files - ``imap`` - ``host`` - str: The IMAP server hostname or IP address - ``port`` - int: The IMAP server port (Default: 993) diff --git a/docs/index.rst b/docs/index.rst index f831018..2758063 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -142,6 +142,8 @@ The full set of configuration options are: - ``debug`` - bool: Print debugging messages - ``silent`` - bool: Only print errors (Default: True) - ``log_file`` - str: Write log messages to a file at this path + - ``n_procs`` - int: Number of process to run in parallel when parsing in CLI mode (Default: 1) + - ``chunk_size`` - int: Number of files to give to each process when running in parallel. Setting this to a number larger than one can improve performance when processing thousands of files - ``imap`` - ``host`` - str: The IMAP server hostname or IP address - ``port`` - int: The IMAP server port (Default: 993) diff --git a/parsedmarc/cli.py b/parsedmarc/cli.py index 33331e3..b6b3044 100644 --- a/parsedmarc/cli.py +++ b/parsedmarc/cli.py @@ -207,7 +207,7 @@ def _main(): smtp_message="Please see the attached DMARC results.", log_file=args.log_file, n_procs=1, - chunksize=1 + chunk_size=1 ) args = arg_parser.parse_args() @@ -242,8 +242,8 @@ def _main(): opts.log_file = general_config["log_file"] if "n_procs" in general_config: opts.n_procs = general_config.getint("n_procs") - if "chunksize" in general_config: - opts.chunksize = general_config.getint("chunksize") + if "chunk_size" in general_config: + opts.chunk_size = general_config.getint("chunk_size") if "imap" in config.sections(): imap_config = config["imap"] if "host" in imap_config: @@ -401,7 +401,7 @@ def _main(): repeat(opts.nameservers), repeat(opts.dns_timeout), repeat(opts.n_procs >= 1)), - opts.chunksize) + opts.chunk_size) pbar = tqdm(total=len(file_paths)) while not results.ready(): pbar.update(counter.value - pbar.n)