@workflow
async def workflow_with_waits(ctx: WorkflowContext, input: dict):
# Step 1: Process (counts toward timeout)
await ctx.step.run("process", process_data, input)
# Step 2: Wait 1 hour (does NOT count toward timeout)
await ctx.step.wait_for("wait", hours=1)
# Step 3: More processing (counts toward timeout, but resets execution time of step 1)
await ctx.step.run("finalize", finalize_data, input)
# Timeout only counts running time, not waiting time
client = PolosClient()
handle = await workflow_with_waits.invoke(
client,
payload={...},
run_timeout_seconds=60 # 60 seconds of continuous running time
)