From 4f0692022467af96f4a40345e49ed1af0843fec3 Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Thu, 7 Feb 2019 17:24:47 -0800 Subject: [PATCH] Be os.nice()-r --- src/ocrmypdf/__main__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ocrmypdf/__main__.py b/src/ocrmypdf/__main__.py index ad8699f3..bfd3f6a9 100755 --- a/src/ocrmypdf/__main__.py +++ b/src/ocrmypdf/__main__.py @@ -1101,6 +1101,8 @@ def run_pipeline(args=None): build_pipeline(options, work_folder, _log, context) atexit.register(cleanup_working_files, work_folder, options) + if hasattr(os, 'nice'): + os.nice(5) cmdline.run(options) except ruffus_exceptions.RethrownJobError as e: if options.verbose: