Skip to content

Commit

Permalink
maxParallelism check on restart
Browse files Browse the repository at this point in the history
  • Loading branch information
nitesh.agrawal committed Mar 20, 2019
1 parent ab6a8c2 commit 295318c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions babe
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,11 @@ def restartCommand(restartOptionsParser):
parallelism = restartOptionsParser.parallelism
targetScale=len(instances)
if parallelism > 1:
if parallelism >= targetScale / 2:
print("parallelism can not be more than or equal to " + str(int(targetScale / 2)))
maxAllowedParallelism = int(targetScale/2)
if(maxAllowedParallelism<1) :
maxAllowedParallelism = 1
if parallelism >= maxAllowedParallelism:
print("parallelism can not be more than " + str(maxAllowedParallelism))
return
if restartOptionsParser.noScaling == False:
targetScale=len(instances) + parallelism
Expand Down

0 comments on commit 295318c

Please sign in to comment.