Skip to content

feat(engine): make fallback task poll interval configurable (default 20s) - #77

Merged
Zhoujie628 merged 1 commit into
project-openan:mainfrom
Zhoujie628:main
Sep 16, 2026
Merged

Zhoujie628 merged 1 commit into
project-openan:mainfrom
Zhoujie628:main

Conversation

@Zhoujie628

@Zhoujie628 Zhoujie628 commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

The fallback task-polling interval (used when an SSE stream ends before a terminal state) was hardcoded at 250ms, causing ~1000 getTask polls and log spam during a 138-second task execution observed in field logs.

Add taskPollIntervalMillis to WorkflowEngineClientConfig (default 20000ms = 20 seconds). Polling only triggers when a streaming response is interrupted before the task reaches a terminal state (e.g. a gateway closes the SSE channel mid-stream); while SSE is alive (heartbeats still arriving), polling does not start. The overall interaction remains bounded by sendTimeoutSeconds (600s default).

Tests that exercise the polling path use 100ms for fast feedback; all 24 negotiation tests pass.

@Zhoujie628
Zhoujie628 requested a review from a team as a code owner September 16, 2026 09:57
@Zhoujie628
Zhoujie628 force-pushed the main branch 2 times, most recently from eeb3a27 to fa7da2b Compare September 16, 2026 10:01
…20s)

The fallback task-polling interval (used when an SSE stream ends before
a terminal state) was hardcoded at 250ms, causing ~1000 getTask polls
and log spam during a 138-second task execution observed in field logs.

Add taskPollIntervalMillis to WorkflowEngineClientConfig (default 20000ms
= 20 seconds). Polling only triggers when a streaming response is
interrupted before the task reaches a terminal state (e.g. a gateway
closes the SSE channel mid-stream); while SSE is alive (heartbeats still
arriving), polling does not start. Tests that exercise the polling path
use 100ms for fast feedback.

Signed-off-by: Zhoujie628 <zhoujie628@users.noreply.github.com>
@Zhoujie628
Zhoujie628 merged commit 051b07b into project-openan:main Sep 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant