Add cancellation token support and extend timeout to 30 minutes for external API calls
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m19s
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m19s
This commit is contained in:
parent
0a170fd259
commit
659e06a08d
7 changed files with 76 additions and 76 deletions
|
|
@ -186,14 +186,14 @@ namespace BMA.EHR.Application.Repositories
|
|||
}
|
||||
}
|
||||
|
||||
public async Task<GetProfileByKeycloakIdDto?> GetProfileByKeycloakIdNewAsync(Guid keycloakId, string? accessToken)
|
||||
public async Task<GetProfileByKeycloakIdDto?> GetProfileByKeycloakIdNewAsync(Guid keycloakId, string? accessToken,CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
var apiPath = $"{_configuration["API"]}/org/dotnet/by-keycloak/{keycloakId}";
|
||||
var apiKey = _configuration["API_KEY"];
|
||||
|
||||
var apiResult = await GetExternalAPIAsync(apiPath, accessToken ?? "", apiKey);
|
||||
var apiResult = await GetExternalAPIAsync(apiPath, accessToken ?? "", apiKey, cancellationToken);
|
||||
if (apiResult != null)
|
||||
{
|
||||
var raw = JsonConvert.DeserializeObject<GetProfileByKeycloakIdResultDto>(apiResult);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue