diff --git a/src/FilterLists.Agent/ListArchiver/DownloadList.cs b/src/FilterLists.Agent/ListArchiver/DownloadList.cs index 7f4815778..cb3a65047 100644 --- a/src/FilterLists.Agent/ListArchiver/DownloadList.cs +++ b/src/FilterLists.Agent/ListArchiver/DownloadList.cs @@ -73,11 +73,13 @@ protected override async Task Handle(Command request, CancellationToken cancella } catch (NotImplementedException) { - _logger.LogWarning($"File extension not supported for list {request.ListInfo.Id} from {request.ListInfo.ViewUrl}."); + _logger.LogWarning( + $"File extension not supported for list {request.ListInfo.Id} from {request.ListInfo.ViewUrl}."); } catch (ArgumentException ex) { - _logger.LogError(ex, $"Could not determine the file extension for list {request.ListInfo.Id} from {request.ListInfo.ViewUrl}."); + _logger.LogError(ex, + $"Could not determine the file extension for list {request.ListInfo.Id} from {request.ListInfo.ViewUrl}."); } } @@ -86,12 +88,15 @@ private async Task DownloadByFileExtension(Command request, CancellationToken ca var extension = Path.GetExtension(request.ListInfo.ViewUrl.AbsolutePath); if (DownloadRequestsByFileExtension.ContainsKey(extension)) { - _logger.LogInformation($"Downloading list {request.ListInfo.Id} from {request.ListInfo.ViewUrl}..."); - await _mediator.Send(DownloadRequestsByFileExtension[extension].Invoke(request.ListInfo), cancellationToken); + _logger.LogInformation( + $"Downloading list {request.ListInfo.Id} from {request.ListInfo.ViewUrl}..."); + await _mediator.Send(DownloadRequestsByFileExtension[extension].Invoke(request.ListInfo), + cancellationToken); } else { - _logger.LogWarning($"File extension not recognized for list {request.ListInfo.Id} from {request.ListInfo.ViewUrl}."); + _logger.LogWarning( + $"File extension not recognized for list {request.ListInfo.Id} from {request.ListInfo.ViewUrl}."); } } } diff --git a/src/FilterLists.Agent/ListArchiver/DownloadLists.cs b/src/FilterLists.Agent/ListArchiver/DownloadLists.cs index 3ee009346..6faaff8a5 100644 --- a/src/FilterLists.Agent/ListArchiver/DownloadLists.cs +++ b/src/FilterLists.Agent/ListArchiver/DownloadLists.cs @@ -36,7 +36,7 @@ protected override async Task Handle(Command request, CancellationToken cancella new ExecutionDataflowBlockOptions {MaxDegreeOfParallelism = MaxDegreeOfParallelism} ); foreach (var list in request.ListInfo) - await downloader.SendAsync(list, cancellationToken); + await downloader.SendAsync(list, cancellationToken); downloader.Complete(); await downloader.Completion; } diff --git a/src/FilterLists.Agent/ListArchiver/DownloadRequestsByFileExtension/DownloadTxt.cs b/src/FilterLists.Agent/ListArchiver/DownloadRequestsByFileExtension/DownloadTxt.cs index 89f05f1d2..81fe28549 100644 --- a/src/FilterLists.Agent/ListArchiver/DownloadRequestsByFileExtension/DownloadTxt.cs +++ b/src/FilterLists.Agent/ListArchiver/DownloadRequestsByFileExtension/DownloadTxt.cs @@ -38,7 +38,8 @@ protected override async Task Handle(Command request, CancellationToken cancella if (response.IsSuccessStatusCode) try { - using (Stream output = File.OpenWrite(Path.Combine("archives", $"{request.ListInfo.Id}.txt"))) + using (Stream output = + File.OpenWrite(Path.Combine("archives", $"{request.ListInfo.Id}.txt"))) using (var input = await response.Content.ReadAsStreamAsync()) { input.CopyTo(output); @@ -46,7 +47,8 @@ protected override async Task Handle(Command request, CancellationToken cancella } catch (HttpRequestException ex) { - _logger.LogError(ex, $"Error downloading list {request.ListInfo.Id} from {request.ListInfo.ViewUrl}."); + _logger.LogError(ex, + $"Error downloading list {request.ListInfo.Id} from {request.ListInfo.ViewUrl}."); } } }