-
-
Notifications
You must be signed in to change notification settings - Fork 111
feat: Set timeout
flag when wait-until
timeouted
#1804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
## Walkthrough
A new property, `timeout: true`, is added to the context object passed to the `setCustomOutputs` method within the timeout callback of the wait-until node. This change explicitly signals that the output was triggered by a timeout event, without altering any other logic or control flow.
## Changes
| File(s) | Change Summary |
|-------------------------------------------|-----------------------------------------------------------------------------------------------|
| src/nodes/wait-until/WaitUntilController.ts | Adds `timeout: true` to the context object in the timeout callback for `setCustomOutputs`. |
| docs/node/wait-until.md | Updates documentation to describe the new `timeout` output property and modifies `config` description. |
## Sequence Diagram(s)
```mermaid
sequenceDiagram
participant WaitUntilNode
participant Entity
participant Controller
WaitUntilNode->>Entity: Wait for state change
alt State changes before timeout
Entity-->>WaitUntilNode: State changed
WaitUntilNode->>Controller: setCustomOutputs(context)
else Timeout occurs
WaitUntilNode->>Controller: setCustomOutputs({..., timeout: true})
end
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
docs/node/wait-until.md (1)
101-101
: Clarify wording oftimeout
output property
The newtimeout
bullet is correct, but you might rephrase for consistency and clarity. For example:
`timeout`: set to `true` when the node’s output is triggered by a timeout event.
This mirrors the style used elsewhere in the documentation.🧰 Tools
🪛 LanguageTool
[uncategorized] ~101-~101: Loose punctuation mark.
Context: ...nfig properties of the node. -timeout
: set totrue
if node output was from t...(UNLIKELY_OPENING_PUNCTUATION)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/node/wait-until.md
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/node/wait-until.md
[uncategorized] ~100-~100: Loose punctuation mark.
Context: ...ected and the timeout occurs. - config
: config properties of the node. - `timeo...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~101-~101: Loose punctuation mark.
Context: ...nfig properties of the node. - timeout
: set to true
if node output was from t...
(UNLIKELY_OPENING_PUNCTUATION)
🔇 Additional comments (1)
docs/node/wait-until.md (1)
100-100
: Consistent punctuation forconfig
bullet
Great update adding the trailing period to theconfig
description—this aligns it with the other list items.🧰 Tools
🪛 LanguageTool
[uncategorized] ~100-~100: Loose punctuation mark.
Context: ...ected and the timeout occurs. -config
: config properties of the node. - `timeo...(UNLIKELY_OPENING_PUNCTUATION)
Very simple, yet helpful addition to
wait-until
node's timeout output.Sometimes this node is a beginning to a big flow that may run some portion if state timeout'd. Both outputs may connect to the same next node, but it may be a
switch
that performs slightly different actions on state reached or timeout.I'm not sure if I made the addition in a correct place and, true – I haven't tested this locally – but that effort would be much bigger than just creating this PR. Therefore I ask for your understanding. :)
Summary by CodeRabbit