feat: feed worker metrics into runtime router

This commit is contained in:
John
2026-07-02 07:35:10 +08:00
parent b97c8e822e
commit a13808b462
8 changed files with 399 additions and 9 deletions
+5 -1
View File
@@ -96,7 +96,11 @@ for (const id of [...new Set(workers)].sort()) {
activeStreams > 0 &&
lastStreamStartedAt &&
staleAgeMs > staleMs &&
(!lastStreamEndedAt || lastStreamEndedAt < lastStreamStartedAt),
(
!lastStreamEndedAt ||
lastStreamEndedAt >= lastStreamStartedAt ||
now - lastStreamEndedAt > staleMs
),
);
if (action === 'reconcile' && stale && apply) {
await client