Skip to content

Commit d95d8ca

Browse files
committed
refactor code a little bit:
1 parent 5c161b8 commit d95d8ca

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/DurableTask.SqlServer.AzureFunctions/SqlMetricsProvider.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,12 @@ public SqlMetricsProvider(SqlOrchestrationService service)
2020

2121
public virtual async Task<SqlScaleMetric> GetMetricsAsync(int? previousWorkerCount = null)
2222
{
23-
int recommendedReplicaCount;
24-
2523
// We only want to query the metrics every 5 seconds.
2624
if (this.metrics == null || DateTime.UtcNow >= this.metricsTimeStamp.AddSeconds(5))
2725
{
2826
// GetRecommendedReplicaCountAsync will write a trace if the recommendation results
2927
// in a worker count that is different from the worker count we pass in as an argument.
30-
recommendedReplicaCount = await this.service.GetRecommendedReplicaCountAsync(
28+
int recommendedReplicaCount = await this.service.GetRecommendedReplicaCountAsync(
3129
previousWorkerCount,
3230
CancellationToken.None);
3331

0 commit comments

Comments
 (0)