Фикс метода AddToGroup

This commit is contained in:
Olga Nemt 2023-10-25 16:12:35 +05:00
parent 40ce3055f8
commit f620d75a19

View File

@ -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