mirror of
https://github.com/C9Glax/tranga.git
synced 2025-09-10 11:58:19 +02:00
Fix asynchronous chapter checking
This commit is contained in:
@@ -16,7 +16,7 @@ public class UpdateChaptersDownloadedWorker(TimeSpan? interval = null, IEnumerab
|
|||||||
Log.Debug("Checking chapter files...");
|
Log.Debug("Checking chapter files...");
|
||||||
List<Chapter> chapters = await DbContext.Chapters.ToListAsync(CancellationToken);
|
List<Chapter> chapters = await DbContext.Chapters.ToListAsync(CancellationToken);
|
||||||
Log.Debug($"Checking {chapters.Count} chapters...");
|
Log.Debug($"Checking {chapters.Count} chapters...");
|
||||||
chapters.ForEach(async void (chapter) =>
|
foreach (Chapter chapter in chapters)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -26,7 +26,7 @@ public class UpdateChaptersDownloadedWorker(TimeSpan? interval = null, IEnumerab
|
|||||||
{
|
{
|
||||||
Log.Error(exception);
|
Log.Error(exception);
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
if(await DbContext.Sync(CancellationToken) is { success: false } e)
|
if(await DbContext.Sync(CancellationToken) is { success: false } e)
|
||||||
Log.Error($"Failed to save database changes: {e.exceptionMessage}");
|
Log.Error($"Failed to save database changes: {e.exceptionMessage}");
|
||||||
|
Reference in New Issue
Block a user