This commit is contained in:
Sean Whalen
2019-02-24 22:42:43 -05:00
parent cc6f4bb680
commit 47f32fb189
3 changed files with 8 additions and 6 deletions

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)