Very short waits count towards compute usage#1888
Conversation
|
|
Caution Review failedThe pull request is closed. WalkthroughThis update revises the documentation and the wait behavior in the SDK. The documentation now explains that during task triggering and waiting, the parent task is checkpointed and waiting time (after 5 seconds) does not count towards compute usage. In the SDK, a new 5000 ms threshold constant and a function to log warnings for waits below this threshold have been added. The Changes
Sequence Diagram(s)sequenceDiagram
participant User as Caller
participant WaitMethod as wait.for()/wait.until()
participant Checker as Duration Checker
participant Logger as printWaitBelowThreshold()
User->>WaitMethod: Invoke wait method with duration/datetime
WaitMethod->>Checker: Calculate & check duration
alt Duration <= 5000 ms
Checker-->>WaitMethod: Duration below threshold
WaitMethod->>Logger: Log warning message
else Duration > 5000 ms
Checker-->>WaitMethod: Duration acceptable
end
WaitMethod->>User: Proceed with wait (checkpoint if needed)
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
…er explain compute costs
Summary by CodeRabbit
Documentation
New Features