gps matcher async

put cryptography lib to fixed version
fix race condition bug in queue handler
add lock to db writing and backup to file db on each write
This commit is contained in:
Alex Bezdieniezhnykh
2025-05-29 00:35:35 +03:00
parent 34ea821fb3
commit d842466594
12 changed files with 245 additions and 191 deletions
+9 -15
View File
@@ -106,21 +106,6 @@ public partial class DatasetExplorer
new List<DetectionClass> { new() {Id = -1, Name = "All", ShortName = "All"}}
.Concat(_annotationConfig.DetectionClasses));
LvClasses.Init(AllDetectionClasses);
_dbFactory.Run(db =>
{
var allAnnotations = db.Annotations
.LoadWith(x => x.Detections)
.OrderBy(x => x.AnnotationStatus)
.ThenByDescending(x => x.CreatedDate)
.ToList();
foreach (var annotation in allAnnotations)
AddAnnotationToDict(annotation);
return null!;
});
DataContext = this;
}
private async void OnLoaded(object sender, RoutedEventArgs e)
@@ -138,6 +123,15 @@ public partial class DatasetExplorer
ExplorerEditor.CurrentAnnClass = LvClasses.CurrentDetectionClass ?? _annotationConfig.DetectionClasses.First();
var allAnnotations = await _dbFactory.Run(async db =>
await db.Annotations.LoadWith(x => x.Detections)
.OrderBy(x => x.AnnotationStatus)
.ThenByDescending(x => x.CreatedDate)
.ToListAsync());
foreach (var annotation in allAnnotations)
AddAnnotationToDict(annotation);
await ReloadThumbnails();
LoadClassDistribution();