Repository navigation
Commit 9f2b077
feat(platform): Platform.on_shutdown - the agent-question streams end when the application stops; the bundle rebuilt
Found by the live drive of the React UI (mercury-composable docs/test-reports/agent-question-ui-live-drive.md): a
device holding the agent-question stream kept a stopping backend alive - after SIGTERM the host stopped listening
within two seconds but aiohttp waited for the stream, which never ends on its own, and the process was still there 75
seconds later; in a container, the grace period and a SIGKILL. Platform.on_shutdown maps to aiohttp's on_shutdown: the
moment the application starts to stop, before the host waits for the requests in flight; the agent-question app ends
every device's stream there (close_streams) and the devices reconnect to the next instance from their last sequence.
Re-driven: the process gone within a second of SIGTERM, the device connected again three seconds after the restart.
The bundle rebuilt in the Node.js pack (the card order within a case, mark all notices as seen) and recommitted here.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>1 parent 96629e2 commit 9f2b077
7 files changed
Lines changed: 74 additions & 10 deletions
File tree
- extensions/agent-question
- resources/public
- assets
- src/mercury_composable
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
188 | 200 | | |
189 | 201 | | |
190 | 202 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
605 | 605 | | |
606 | 606 | | |
607 | 607 | | |
608 | | - | |
| 608 | + | |
| 609 | + | |
609 | 610 | | |
610 | 611 | | |
611 | | - | |
| 612 | + | |
| 613 | + | |
612 | 614 | | |
613 | | - | |
614 | | - | |
| 615 | + | |
| 616 | + | |
615 | 617 | | |
| 618 | + | |
| 619 | + | |
616 | 620 | | |
617 | 621 | | |
618 | | - | |
| 622 | + | |
619 | 623 | | |
620 | 624 | | |
621 | 625 | | |
622 | 626 | | |
623 | 627 | | |
624 | 628 | | |
625 | 629 | | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
626 | 637 | | |
627 | 638 | | |
628 | 639 | | |
| |||
920 | 931 | | |
921 | 932 | | |
922 | 933 | | |
| 934 | + | |
| 935 | + | |
923 | 936 | | |
924 | 937 | | |
925 | 938 | | |
| |||
1095 | 1108 | | |
1096 | 1109 | | |
1097 | 1110 | | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
1098 | 1118 | | |
1099 | 1119 | | |
1100 | 1120 | | |
| |||
1107 | 1127 | | |
1108 | 1128 | | |
1109 | 1129 | | |
| 1130 | + | |
1110 | 1131 | | |
1111 | 1132 | | |
1112 | 1133 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
| 461 | + | |
461 | 462 | | |
462 | 463 | | |
463 | 464 | | |
| |||
468 | 469 | | |
469 | 470 | | |
470 | 471 | | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
471 | 480 | | |
472 | 481 | | |
473 | 482 | | |
| |||
481 | 490 | | |
482 | 491 | | |
483 | 492 | | |
484 | | - | |
| 493 | + | |
485 | 494 | | |
486 | 495 | | |
487 | 496 | | |
| |||
491 | 500 | | |
492 | 501 | | |
493 | 502 | | |
| 503 | + | |
| 504 | + | |
494 | 505 | | |
495 | 506 | | |
496 | 507 | | |
| |||
0 commit comments