feat(ui): subscribe workflow runs status

This commit is contained in:
Fu Diwei
2025-02-08 23:03:31 +08:00
parent 0bc40fd676
commit a74ec95a6a
4 changed files with 43 additions and 11 deletions

View File

@@ -64,8 +64,8 @@ const WorkflowDetail = () => {
useEffect(() => {
if (!!workflowId && isPendingOrRunning) {
subscribeWorkflow(workflowId, (e) => {
if (e.record.lastRunStatus !== WORKFLOW_RUN_STATUSES.PENDING && e.record.lastRunStatus !== WORKFLOW_RUN_STATUSES.RUNNING) {
subscribeWorkflow(workflowId, (cb) => {
if (cb.record.lastRunStatus !== WORKFLOW_RUN_STATUSES.PENDING && cb.record.lastRunStatus !== WORKFLOW_RUN_STATUSES.RUNNING) {
setIsPendingOrRunning(false);
unsubscribeWorkflow(workflowId);
}