shellutils
shellutils copied to clipboard
Minor: Incorrect job_pool_nerrors in the echo off mode
Hi,
I am playing with the sample ./job_pool_sample.sh and have noticed that it dumps job_pool_nerrors: 0 by default when the job pool is created in non-echo mode, even though there are two jobs that fail (return false). In the interactive mode (echo on) it correctly dumps 2 failures.
The problem seems to be in the _job_pool_worker(), where the _job_pool_print_result_log() is used to log the result into the log file and which does nothing for the non-echo mode.
I can provide a pull request with the fix, if helpful (changing to plain echo and adding echo on condition into the _job_pool_print_result_log().
Regards,,
Martin
shellutils_issue4_fix.diff.txt DIff with a fix.