Skip to content

Commit

Permalink
Fixed typo; removed unused var --ECL
Browse files Browse the repository at this point in the history
  • Loading branch information
Enkidu93 committed Sep 6, 2023
1 parent d5fda6f commit 51214aa
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ public class ClearMLAuthenticationService : BackgroundService, IClearMLAuthentic
// technically, the token should be good for 30 days, but let's refresh each hour
// to know well ahead of time if something is wrong.
private const int RefreshPeriod = 3600;
private int _consecutiveFailureCount = 0;
private string _authToken = "";

public ClearMLAuthenticationService(
Expand Down
2 changes: 1 addition & 1 deletion src/SIL.Machine.AspNetCore/Services/ClearMLService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public async Task<bool> WorkersAreAssignedToQueue(CancellationToken cancellation
{
Content = new StringContent(body.ToJsonString(), Encoding.UTF8, "application/json")
};
request.Headers.Add("Authorization", $"Bearer {await _clearMLAuthService.GetAuthToken()}");
request.Headers.Add("Authorization", $"Bearer {await _clearMLAuthService.GetAuthTokenAsync()}");
HttpResponseMessage response = await _httpClient.SendAsync(request, cancellationToken);
string result = await response.Content.ReadAsStringAsync(cancellationToken);
return (JsonObject?)JsonNode.Parse(result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public async Task CreateTaskAsync()
}
);
var authService = Substitute.For<IClearMLAuthenticationService>();
authService.GetAuthToken().Returns("accessToken");
authService.GetAuthTokenAsync().Returns("accessToken");
var service = new ClearMLService(
mockHttp.ToHttpClient(),
options,
Expand Down

0 comments on commit 51214aa

Please sign in to comment.