mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 10:26:31 +00:00
switcher dataset explorer
lat lon -> geopoint correct location for gps if small keypoints number
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user