public async Task <ScheduleItem> LoadByNameAsync(string name, CancellationToken cancellationToken = default(CancellationToken)) { var request = new WebProxyRequest { Path = "/schedule-items", Data = new RequestData <string> { Queues = _queues, Data = name } }; var response = await _webProxyClient.GetAsync <ScheduleItem>(request, cancellationToken); if (!response.IsSuccessStatusCode) { _logger.LogWarning("Load schedule item failed."); _logger.LogDebug(response.Content); } return(response.Data); }
public async Task <List <ProgressItem> > LoadByCorrelationIdAsync(Guid correlationId, CancellationToken cancellationToken) { var request = new WebProxyRequest { Path = "/progress-items", Data = new RequestData <Guid> { Queues = _queues, Data = correlationId } }; var response = await _webProxyClient.GetAsync <List <ProgressItem> >(request, cancellationToken); if (!response.IsSuccessStatusCode) { _logger.LogWarning("Load progress failed."); _logger.LogDebug(response.Content); } return(response.Data); }