Commit 40eb3ae
committed
Heartbeat every 30s while waiting on the approval workflow
The approval handler blocks on handle.result() for as long as the
operator takes to decide. AgenticSession only heartbeats between LLM
turns, so a multi-hour wait inside this handler would trigger
heartbeat timeout (default 120s) and kill the activity.
Spawn a ticker task that fires activity.heartbeat() every 30s for
the duration of the wait, cancelled in finally when handle.result()
returns. Survives realistic operator delays without churn.
Existing tests still pass (the test path uses a fake deps record
that doesn't go through this code path).1 parent f8d6c8f commit 40eb3ae
1 file changed
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
370 | | - | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
0 commit comments