mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 08:12:43 +00:00
build: fix ineffective dynamic imports with lazy boundaries (#33690)
Merged via squash.
Prepared head SHA: 38b3c23d6f
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
This commit is contained in:
committed by
GitHub
parent
a4850b1b8f
commit
21e8d88c1d
@@ -25,6 +25,14 @@ let lastActivityAt = 0;
|
||||
const DEFAULT_STUCK_SESSION_WARN_MS = 120_000;
|
||||
const MIN_STUCK_SESSION_WARN_MS = 1_000;
|
||||
const MAX_STUCK_SESSION_WARN_MS = 24 * 60 * 60 * 1000;
|
||||
let commandPollBackoffRuntimePromise: Promise<
|
||||
typeof import("../agents/command-poll-backoff.runtime.js")
|
||||
> | null = null;
|
||||
|
||||
function loadCommandPollBackoffRuntime() {
|
||||
commandPollBackoffRuntimePromise ??= import("../agents/command-poll-backoff.runtime.js");
|
||||
return commandPollBackoffRuntimePromise;
|
||||
}
|
||||
|
||||
function markActivity() {
|
||||
lastActivityAt = Date.now();
|
||||
@@ -376,7 +384,7 @@ export function startDiagnosticHeartbeat(config?: OpenClawConfig) {
|
||||
queued: totalQueued,
|
||||
});
|
||||
|
||||
import("../agents/command-poll-backoff.js")
|
||||
void loadCommandPollBackoffRuntime()
|
||||
.then(({ pruneStaleCommandPolls }) => {
|
||||
for (const [, state] of diagnosticSessionStates) {
|
||||
pruneStaleCommandPolls(state);
|
||||
|
||||
Reference in New Issue
Block a user