switcher dataset explorer

lat lon -> geopoint
correct location for gps if small keypoints number
This commit is contained in:
Alex Bezdieniezhnykh
2025-06-23 20:47:28 +03:00
parent ad1e39268c
commit f58dd3d04f
31 changed files with 469 additions and 192 deletions
+5 -5
View File
@@ -59,7 +59,7 @@ public class AnnotationService : IAnnotationService
Task.Run(async () => await InitQueueConsumer()).Wait();
}
private async Task InitQueueConsumer(CancellationToken cancellationToken = default)
private async Task InitQueueConsumer(CancellationToken token = default)
{
if (!_api.CurrentUser.Role.IsValidator())
return;
@@ -79,7 +79,7 @@ public class AnnotationService : IAnnotationService
OffsetSpec = new OffsetTypeOffset(offsets.AnnotationsOffset),
MessageHandler = async (_, _, context, message) =>
{
await _messageProcessingSemaphore.WaitAsync(cancellationToken);
await _messageProcessingSemaphore.WaitAsync(token);
try
{
var email = (string)message.ApplicationProperties[nameof(User.Email)]!;
@@ -101,15 +101,15 @@ public class AnnotationService : IAnnotationService
msg.Role,
msg.Email,
context.Offset,
token: cancellationToken);
token: token);
}
else
{
var msg = MessagePackSerializer.Deserialize<AnnotationBulkMessage>(message.Data.Contents);
if (annotationStatus == AnnotationStatus.Validated)
await ValidateAnnotations(msg.AnnotationNames.ToList(), true, cancellationToken);
await ValidateAnnotations(msg.AnnotationNames.ToList(), true, token);
if (annotationStatus == AnnotationStatus.Deleted)
await _mediator.Publish(new AnnotationsDeletedEvent(msg.AnnotationNames.ToList(), fromQueue:true), cancellationToken);
await _mediator.Publish(new AnnotationsDeletedEvent(msg.AnnotationNames.ToList(), fromQueue:true), token);
}
}