0xRain
acb9cbb898
fix(gateway): drain active turns before restart to prevent message loss ( #13931 )
...
* fix(gateway): drain active turns before restart to prevent message loss
On SIGUSR1 restart, the gateway now waits up to 30s for in-flight agent
turns to complete before tearing down the server. This prevents buffered
messages from being dropped when config.patch or update triggers a restart
while agents are mid-turn.
Changes:
- command-queue.ts: add getActiveTaskCount() and waitForActiveTasks()
helpers to track and wait on active lane tasks
- run-loop.ts: on restart signal, drain active tasks before server.close()
with a 30s timeout; extend force-exit timer accordingly
- command-queue.test.ts: update imports for new exports
Fixes #13883
* fix(queue): snapshot active tasks for restart drain
---------
Co-authored-by: Elonito <0xRaini@users.noreply.github.com >
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com >
2026-02-12 07:55:19 -06:00
..
2026-02-01 10:03:47 +09:00
2026-02-08 04:53:31 -08:00
2026-02-12 07:45:09 -06:00
2026-02-12 07:55:19 -06:00
2026-02-01 10:03:47 +09:00
2026-02-08 04:53:31 -08:00
2026-02-12 07:01:48 -06:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-01-31 16:19:20 +09:00
2026-01-31 16:19:20 +09:00
2026-01-14 01:17:56 +00:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-01-30 03:16:21 +01:00
2026-02-05 00:17:09 -08:00
2026-02-05 00:17:09 -08:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-01-30 03:16:21 +01:00
2026-01-31 16:19:20 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-01-31 18:31:49 +09:00
2026-02-01 10:03:47 +09:00
2026-01-14 15:02:19 +00:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-01-31 16:19:20 +09:00
2026-02-08 23:59:43 -08:00
2026-02-01 10:03:47 +09:00
2026-01-14 15:02:19 +00:00
2026-02-09 18:56:58 -08:00
2026-02-01 10:03:47 +09:00
2026-02-04 01:03:59 -08:00
2026-01-14 01:17:56 +00:00
2026-01-31 16:19:20 +09:00
2026-01-14 01:17:56 +00:00
2026-02-01 10:03:47 +09:00
2026-02-08 04:53:31 -08:00
2026-02-02 15:37:05 +09:00
2026-01-30 03:16:21 +01:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-01-21 10:23:30 +00:00
2026-02-08 04:53:31 -08:00
2026-02-05 15:52:51 -08:00
2026-01-14 01:17:56 +00:00
2026-02-04 01:03:59 -08:00
2026-01-31 16:19:20 +09:00
2026-01-31 16:19:20 +09:00
2026-01-30 03:16:21 +01:00
2026-02-02 02:07:47 -08:00
2026-02-11 08:24:08 -05:00
2026-02-11 08:35:49 -05:00
2026-02-02 23:45:05 -08:00
2026-02-02 23:45:05 -08:00
2026-01-31 16:04:04 +09:00
2026-02-01 10:03:47 +09:00
2026-01-18 08:45:29 +00:00
2026-01-30 03:16:21 +01:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-02 17:36:49 +00:00
2026-01-14 01:17:56 +00:00
2026-01-31 16:19:20 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-01-17 05:48:56 +00:00
2026-01-31 16:19:20 +09:00
2026-02-01 10:03:47 +09:00
2026-02-09 20:42:35 -08:00
2026-02-09 20:42:35 -08:00
2026-02-01 10:03:47 +09:00
2026-01-31 16:19:20 +09:00
2026-01-31 16:19:20 +09:00
2026-02-01 10:03:47 +09:00
2026-02-09 13:05:48 -06:00
2026-02-02 21:44:02 +09:00
2026-01-31 16:19:20 +09:00
2026-02-08 20:06:29 -05:00
2026-02-08 16:20:13 -05:00
2026-01-31 16:19:20 +09:00
2026-01-21 04:39:15 +00:00
2026-01-31 16:04:04 +09:00
2026-02-11 14:48:45 -05:00
2026-01-14 01:17:56 +00:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-03 13:56:20 -05:00
2026-02-03 13:56:20 -05:00
2026-02-01 10:03:47 +09:00
2026-01-31 16:19:20 +09:00
2026-01-30 03:16:21 +01:00
2026-02-03 20:18:16 +09:00
2026-02-09 18:56:58 -08:00
2026-02-01 10:03:47 +09:00
2025-11-26 00:53:53 +01:00
2026-02-01 10:03:47 +09:00