Repository navigation
feat(engine): make fallback task poll interval configurable (default 20s) - #77
Merged
Merged
Conversation
Zhoujie628
force-pushed
the
main
branch
2 times, most recently
from
September 16, 2026 10:01
eeb3a27 to
fa7da2b
Compare
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.