Skip to content

Commit

Permalink
refactor: use const for number of retries
Browse files Browse the repository at this point in the history
  • Loading branch information
aneojgurhem committed Sep 13, 2023
1 parent d99eb9c commit 3f3a399
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ namespace ArmoniK.Core.Common.Pollster.TaskProcessingChecker;

public class TaskProcessingCheckerClient : ITaskProcessingChecker
{
private const int Retries = 5;
private readonly IHttpClientFactory httpClientFactory_;
private readonly ILogger<TaskProcessingCheckerClient> logger_;

Expand All @@ -45,7 +46,7 @@ public async Task<bool> Check(string taskId,
logger_.LogTrace("Check if task is processing");
var client = httpClientFactory_.CreateClient();

for (var i = 0; i < 5; i++)
for (var i = 0; i < Retries; i++)
{
try
{
Expand Down

0 comments on commit 3f3a399

Please sign in to comment.