Pass cancellation token

This commit is contained in:
Stepan Goremykin
2023-10-07 23:50:45 +02:00
parent 8925390ad4
commit 73309f2649
3 changed files with 8 additions and 6 deletions

View File

@@ -115,7 +115,8 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
{
try
{
previouslyFailedImages = File.ReadAllText(failHistoryPath)
var failHistoryText = await File.ReadAllTextAsync(failHistoryPath, cancellationToken).ConfigureAwait(false);
previouslyFailedImages = failHistoryText
.Split('|', StringSplitOptions.RemoveEmptyEntries)
.ToList();
}
@@ -156,7 +157,7 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks
}
string text = string.Join('|', previouslyFailedImages);
File.WriteAllText(failHistoryPath, text);
await File.WriteAllTextAsync(failHistoryPath, text, cancellationToken).ConfigureAwait(false);
}
numComplete++;