don't send image to the queue on editing

This commit is contained in:
Alex Bezdieniezhnykh
2025-05-20 12:31:18 +03:00
parent edd803c304
commit 522af51a8d
3 changed files with 8 additions and 6 deletions
+3 -4
View File
@@ -97,7 +97,7 @@ public class AnnotationService : IAnnotationService, INotificationHandler<Annota
msg.Time,
JsonConvert.DeserializeObject<List<Detection>>(msg.Detections) ?? [],
msg.Source,
new MemoryStream(msg.Image),
msg.Image == null ? null : new MemoryStream(msg.Image),
msg.Role,
msg.Email,
fromQueue: true,
@@ -141,9 +141,8 @@ public class AnnotationService : IAnnotationService, INotificationHandler<Annota
await SaveAnnotationInner(DateTime.UtcNow, originalMediaName, time, detections, SourceEnum.Manual, stream,
_api.CurrentUser.Role, _api.CurrentUser.Email, token: token);
// Manual save from Validators -> Validated -> stream: azaion-annotations-confirm
// AI, Manual save from Operators -> Created -> stream: azaion-annotations
private async Task<Annotation> SaveAnnotationInner(DateTime createdDate, string originalMediaName, TimeSpan time, List<Detection> detections, SourceEnum source, Stream? stream,
private async Task<Annotation> SaveAnnotationInner(DateTime createdDate, string originalMediaName, TimeSpan time,
List<Detection> detections, SourceEnum source, Stream? stream,
RoleEnum userRole,
string createdEmail,
bool fromQueue = false,