Skip to content

Fix elapsed time always showing "0s" in query output#90

Open
mattiasgeniar wants to merge 1 commit intoKeygraphHQ:mainfrom
mattiasgeniar:fix/query-elapsed-time
Open

Fix elapsed time always showing "0s" in query output#90
mattiasgeniar wants to merge 1 commit intoKeygraphHQ:mainfrom
mattiasgeniar:fix/query-elapsed-time

Conversation

@mattiasgeniar
Copy link

Summary

  • ./shannon query always displayed "Elapsed: 0s" regardless of how long the workflow had been running
  • Root cause: Temporal's deterministic sandbox overrides Date.now() inside workflows to return replay-safe timestamps, so elapsedMs computed workflow-side is always 0
  • Fix: compute elapsed time on the client side using Date.now() - progress.startTime for running workflows, falling back to the workflow-reported elapsedMs for completed
    ones

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