Skip to content

Add durable-timer sleep step to DSL workflow - #26

Merged
robholland merged 3 commits into
mainfrom
ppv/workflow-timer-sleep
Jul 17, 2026
Merged

Add durable-timer sleep step to DSL workflow#26
robholland merged 3 commits into
mainfrom
ppv/workflow-timer-sleep

Conversation

@prathyushpv

Copy link
Copy Markdown
Contributor

Why

Enable durable-timer sleep in the DSL workflow so benchmarks can exercise workflow-timer sleeps (workflow.Sleep), not just the Sleep activity.

What

Add an optional t (SleepSeconds) field to DSLStep. When t > 0, the interpreter calls workflow.Sleep(ctx, t*time.Second) — a durable timer, no activity. Optional and backward compatible (omitempty, 0 = no-op); respects the existing r repeat semantics.

Example: [{"t": 1}, {"a": "Echo", "i": {"Message": "test"}}, {"t": 5}]

Adds a unit test (TestDSLWorkflowWithTimerSleep) asserting the workflow completes and the test env fast-forwards the durable timers. README DSL field list and examples updated.

Add a 't' (SleepSeconds) field to DSLStep so a DSL workflow can sleep
directly via workflow.Sleep (a durable timer) instead of invoking the
Sleep activity. This lets the benchmark exercise workflow-timer sleeps,
not just Sleep activities. The field is optional and backward compatible
(0 = no-op) and respects the existing repeat semantics.
@prathyushpv
prathyushpv marked this pull request as ready for review July 16, 2026 23:42
@prathyushpv
prathyushpv requested a review from a team as a code owner July 16, 2026 23:42
@robholland
robholland merged commit b416ca7 into main Jul 17, 2026
3 of 4 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.

2 participants