Browse Source

add some startup log messages (#872)

pull/873/head
Jason Dove 4 years ago committed by GitHub
parent
commit
8deae983c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      ErsatzTV.Application/Search/Commands/RebuildSearchIndexHandler.cs
  2. 1
      ErsatzTV/Services/RunOnce/CacheCleanerService.cs

4
ErsatzTV.Application/Search/Commands/RebuildSearchIndexHandler.cs

@ -33,10 +33,14 @@ public class RebuildSearchIndexHandler : IRequestHandler<RebuildSearchIndex, Uni @@ -33,10 +33,14 @@ public class RebuildSearchIndexHandler : IRequestHandler<RebuildSearchIndex, Uni
public async Task<Unit> Handle(RebuildSearchIndex request, CancellationToken cancellationToken)
{
_logger.LogInformation("Initializing search index");
bool indexFolderExists = Directory.Exists(FileSystemLayout.SearchIndexFolder);
await _searchIndex.Initialize(_localFileSystem, _configElementRepository);
_logger.LogInformation("Done initializing search index");
if (!indexFolderExists ||
await _configElementRepository.GetValue<int>(ConfigElementKey.SearchIndexVersion) <
_searchIndex.Version)

1
ErsatzTV/Services/RunOnce/CacheCleanerService.cs

@ -54,6 +54,7 @@ public class CacheCleanerService : IHostedService @@ -54,6 +54,7 @@ public class CacheCleanerService : IHostedService
{
_logger.LogInformation("Emptying transcode cache folder");
localFileSystem.EmptyFolder(FileSystemLayout.TranscodeFolder);
_logger.LogInformation("Done emptying transcode cache folder");
}
}

Loading…
Cancel
Save