mirror of
https://github.com/rmcrackan/Libation.git
synced 2026-05-18 13:41:27 -04:00
Refactor DbContext access and disposal
- Remove instance queue. This is a database, after all, and is designed to be accessed and written to concurrently - Reduce the number of calls to DbContexts.Create() - Ensure that no LibationContext remains open across an await boundary. Multithread context access is the most likely culprit for past issues. - Make all Update UserDefinedItem methods asynchronous.
This commit is contained in:
@@ -277,7 +277,7 @@ public class ProcessQueueViewModel : ReactiveObject
|
||||
else if (result == ProcessBookResult.FailedAbort)
|
||||
Queue.ClearQueue();
|
||||
else if (result == ProcessBookResult.FailedSkip)
|
||||
nextBook.LibraryBook.UpdateBookStatus(LiberatedStatus.Error);
|
||||
await nextBook.LibraryBook.UpdateBookStatusAsync(LiberatedStatus.Error);
|
||||
else if (result == ProcessBookResult.LicenseDeniedPossibleOutage && !shownServiceOutageMessage)
|
||||
{
|
||||
await MessageBoxBase.Show($"""
|
||||
|
||||
Reference in New Issue
Block a user