From f620d75a19c24f64358a3b0c1ab5362addbb14df Mon Sep 17 00:00:00 2001 From: Olga Nemt Date: Wed, 25 Oct 2023 16:12:35 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D0=BC=D0=B5=D1=82?= =?UTF-8?q?=D0=BE=D0=B4=D0=B0=20AddToGroup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AsbCloudWebApi/SignalR/ReportsHub.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/AsbCloudWebApi/SignalR/ReportsHub.cs b/AsbCloudWebApi/SignalR/ReportsHub.cs index c761e8c9..18e89473 100644 --- a/AsbCloudWebApi/SignalR/ReportsHub.cs +++ b/AsbCloudWebApi/SignalR/ReportsHub.cs @@ -23,17 +23,18 @@ namespace AsbCloudWebApi.SignalR public override async Task AddToGroup(string groupName) { + await base.AddToGroup(groupName); + var workId = groupName.Replace("Report_", ""); var work = backgroundWorker.WorkStore.RunOnceQueue.FirstOrDefault(work => work.Id == workId); - if (work is null) return; - await base.AddToGroup(groupName); - var state = work.CurrentState; var progress = new ReportProgressDto() { Operation = "Ожидает начала в очереди.", Progress = 0f, }; + + var state = work?.CurrentState; if (state is not null) { progress = new ReportProgressDto