mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 10:26:31 +00:00
fix datasetexplorer view
save annotation with detections fix sending to queue
This commit is contained in:
@@ -8,6 +8,7 @@ using Azaion.Common.DTO.Queue;
|
||||
using Azaion.CommonSecurity.DTO;
|
||||
using Azaion.CommonSecurity.Services;
|
||||
using LinqToDB;
|
||||
using LinqToDB.Data;
|
||||
using MediatR;
|
||||
using MessagePack;
|
||||
using Microsoft.Extensions.Options;
|
||||
@@ -67,7 +68,7 @@ public class AnnotationService
|
||||
//Queue (only from operators)
|
||||
public async Task Consume(AnnotationCreatedMessage message, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (message.CreatedRole == RoleEnum.Validator) //Don't proceed our own messages (or from another Validator)
|
||||
if (message.CreatedRole != RoleEnum.Operator) //Process only operator's messages
|
||||
return;
|
||||
|
||||
await SaveAnnotationInner(
|
||||
@@ -104,6 +105,8 @@ public class AnnotationService
|
||||
? AnnotationStatus.Validated
|
||||
: AnnotationStatus.Created;
|
||||
|
||||
await db.Detections.DeleteAsync(x => x.AnnotationName == fName, token: token);
|
||||
await db.BulkCopyAsync(detections, cancellationToken: token);
|
||||
if (ann != null)
|
||||
await db.Annotations
|
||||
.Where(x => x.Name == fName)
|
||||
|
||||
Reference in New Issue
Block a user