Also check for incorrect parallelBuild values
This commit is contained in:
parent
76a28d8b83
commit
bf165cb43a
1 changed files with 5 additions and 2 deletions
|
|
@ -272,10 +272,13 @@ proc sexec(cmds: openarray[string]) =
|
||||||
|
|
||||||
proc mexec(cmds: openarray[string], processors: int) =
|
proc mexec(cmds: openarray[string], processors: int) =
|
||||||
## Multiprocessor version of exec
|
## Multiprocessor version of exec
|
||||||
if processors < 2:
|
doAssert processors > 0, "nimweb needs at least one processor"
|
||||||
|
if processors == 1:
|
||||||
sexec(cmds)
|
sexec(cmds)
|
||||||
return
|
return
|
||||||
if execProcesses(cmds, {poStdErrToStdOut, poParentStreams, poEchoCmd}) != 0:
|
let r = execProcesses(cmds, {poStdErrToStdOut, poParentStreams, poEchoCmd},
|
||||||
|
n = processors)
|
||||||
|
if r != 0:
|
||||||
echo "external program failed, retrying serial work queue for logs!"
|
echo "external program failed, retrying serial work queue for logs!"
|
||||||
sexec(cmds)
|
sexec(cmds)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue