From: =?utf-8?q?=C3=89tienne_Mollier?= <emollier@debian.org>
Date: Sun, 8 Mar 2026 11:17:36 +0100
Subject: adjust multiprocessed pipeline to the machine's available cores

Bug: https://github.com/cgat-developers/ruffus/issues/104
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=841073
Last-Update: 2021-12-06

The purpose of the patch is to reduce the memory consumption on machines with
little resources, while keeping the tests of high cores count to more buffy
equipment.
Last-Update: 2021-12-06
---
 ruffus/test/test_with_logger.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ruffus/test/test_with_logger.py b/ruffus/test/test_with_logger.py
index 085b4cf..10a07e4 100755
--- a/ruffus/test/test_with_logger.py
+++ b/ruffus/test/test_with_logger.py
@@ -189,7 +189,7 @@ class Test_ruffus(unittest.TestCase):
             pass
 
     def test_simpler(self):
-        pipeline_run(multiprocess=500, verbose=0, pipeline="main")
+        pipeline_run(multiprocess=len(os.sched_getaffinity(0)), verbose=0, pipeline="main")
 
     def test_newstyle_simpler(self):
         test_pipeline = Pipeline("test")
@@ -202,7 +202,7 @@ class Test_ruffus(unittest.TestCase):
         test_pipeline.merge(task4, task3, final_file_name,
                             extras=[logger_proxy, logging_mutex])
         #test_pipeline.merge(task4, task3, final_file_name, extras = {"logger_proxy": logger_proxy, "logging_mutex": logging_mutex})
-        test_pipeline.run(multiprocess=500, verbose=0)
+        test_pipeline.run(multiprocess=len(os.sched_getaffinity(0)), verbose=0)
 
 
 if __name__ == '__main__':
