mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
fix some log messages
This commit is contained in:
parent
be3a8d1eaf
commit
4354b74945
2 changed files with 10 additions and 3 deletions
|
|
@ -69,10 +69,18 @@ protected override async Task Handle(Command request, CancellationToken cancella
|
|||
{
|
||||
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.LogWarning(
|
||||
$"File extension not recognized for list {request.ListInfo.Id} from {request.ListInfo.ViewUrl}.");
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.LogWarning(
|
||||
$"File extension not recognized for list {request.ListInfo.Id} from {request.ListInfo.ViewUrl}.");
|
||||
}
|
||||
|
||||
//TODO: upsert into MariaDB Rules table https://stackoverflow.com/questions/15271202/mysql-load-data-infile-with-on-duplicate-key-update
|
||||
}
|
||||
catch (NotImplementedException)
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ public Handler(ILogger<Handler> logger, HttpClient httpClient)
|
|||
|
||||
protected override async Task Handle(Command request, CancellationToken cancellationToken)
|
||||
{
|
||||
_logger.LogInformation($"Downloading list {request.ListInfo.Id} from {request.ListInfo.ViewUrl}...");
|
||||
try
|
||||
{
|
||||
using (var result = await _httpClient.GetAsync(request.ListInfo.ViewUrl, cancellationToken))
|
||||
|
|
|
|||
Loading…
Reference in a new issue