Skip to content

Commit 4974638

Browse files
Hub: when executing a extra-long running task return message to UI
1 parent af24b61 commit 4974638

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/Certify.Server/Certify.Server.Hub.Api/Services/ManagementAPI.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,17 @@ public async Task<StatusSummary> GetManagedCertificateSummary(AuthContext? curre
389389
new("taskId", taskId)
390390
};
391391

392-
return await PerformInstanceCommandTaskWithResult<ICollection<ActionStep>>(instanceId, args, ManagementHubCommands.ExecuteDeploymentTask);
392+
var result = await PerformInstanceCommandTaskWithResult<ICollection<ActionStep>>(instanceId, args, ManagementHubCommands.ExecuteDeploymentTask);
393+
394+
// a deployment task may take more time to execute than the SignalR/messaging timeout
395+
if (result != null)
396+
{
397+
return result;
398+
}
399+
else
400+
{
401+
return new List<ActionStep> { new ActionStep("Task Still Running", "The deployment task is still running and took longer than the default wait time. Check logs for task status.", hasError: false) };
402+
}
393403
}
394404

395405
/// <summary>

0 commit comments

Comments
 (0)