adjustments to cachedplayer handling

This commit is contained in:
rootdarkarchon 2023-02-15 14:23:06 +01:00
parent 73f009757c
commit eed44f090d
12 changed files with 303 additions and 178 deletions

View file

@ -224,6 +224,12 @@ public class PeriodicFileScanner : MediatorSubscriberBase, IDisposable
Thread.Sleep(1);
}, ct);
if (!_ipcManager.CheckPenumbraApi())
{
Logger.Warn("Penumbra not available");
return;
}
if (ct.IsCancellationRequested) return;
}
}
@ -238,6 +244,12 @@ public class PeriodicFileScanner : MediatorSubscriberBase, IDisposable
Task.WaitAll(dbTasks);
if (!_ipcManager.CheckPenumbraApi())
{
Logger.Warn("Penumbra not available");
return;
}
if (entitiesToUpdate.Any() || entitiesToRemove.Any())
{
foreach (var entity in entitiesToUpdate)
@ -255,6 +267,12 @@ public class PeriodicFileScanner : MediatorSubscriberBase, IDisposable
Logger.Verbose("Scanner validated existing db files");
if (!_ipcManager.CheckPenumbraApi())
{
Logger.Warn("Penumbra not available");
return;
}
if (ct.IsCancellationRequested) return;
// scan new files
@ -279,6 +297,12 @@ public class PeriodicFileScanner : MediatorSubscriberBase, IDisposable
Thread.Sleep(1);
}, ct);
if (!_ipcManager.CheckPenumbraApi())
{
Logger.Warn("Penumbra not available");
return;
}
if (ct.IsCancellationRequested) return;
}