Skip to content

Commit 68777b5

Browse files
committed
updated to $pendingTasks
1 parent 31973dc commit 68777b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

articles/batch/batch-automatic-scaling.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -671,10 +671,10 @@ In this example, the pool size is adjusted based on the number of tasks in the q
671671

672672
```csharp
673673
// Get pending tasks for the past 15 minutes.
674-
$samples = $ActiveTasks.GetSamplePercent(TimeInterval_Minute * 15);
674+
$samples = $PendingTasks.GetSamplePercent(TimeInterval_Minute * 15);
675675
// If we have fewer than 70 percent data points, we use the last sample point,
676676
// otherwise we use the maximum of last sample point and the history average.
677-
$tasks = $samples < 70 ? max(0,$ActiveTasks.GetSample(1)) : max( $ActiveTasks.GetSample(1), avg($ActiveTasks.GetSample(TimeInterval_Minute * 15)));
677+
$tasks = $samples < 70 ? max(0,$PendingTasks.GetSample(1)) : max( $PendingTasks.GetSample(1), avg($PendingTasks.GetSample(TimeInterval_Minute * 15)));
678678
// If number of pending tasks is not 0, set targetVM to pending tasks, otherwise
679679
// half of current dedicated.
680680
$targetVMs = $tasks > 0? $tasks:max(0, $TargetDedicatedNodes/2);

0 commit comments

Comments
 (0)