Commit 285ff4d
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.
setInterval fires heartbeat() every 30s, cleared in finally when
handle.result() returns. Survives realistic operator delays.
Existing tests still pass (the test path uses a fake deps record
that doesn't go through this code path).1 parent ce0176c commit 285ff4d
1 file changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
316 | 317 | | |
317 | 318 | | |
318 | 319 | | |
319 | | - | |
320 | | - | |
321 | | - | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
322 | 332 | | |
0 commit comments