mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-04 13:51:30 +00:00
fix: stabilize plugin startup boundaries
This commit is contained in:
@@ -47,6 +47,10 @@ type LaneState = {
|
||||
generation: number;
|
||||
};
|
||||
|
||||
function isExpectedNonErrorLaneFailure(err: unknown): boolean {
|
||||
return err instanceof Error && err.name === "LiveSessionModelSwitchError";
|
||||
}
|
||||
|
||||
/**
|
||||
* Keep queue runtime state on globalThis so every bundled entry/chunk shares
|
||||
* the same lanes, counters, and draining flag in production builds.
|
||||
@@ -141,10 +145,14 @@ function drainLane(lane: string) {
|
||||
} catch (err) {
|
||||
const completedCurrentGeneration = completeTask(state, taskId, taskGeneration);
|
||||
const isProbeLane = lane.startsWith("auth-probe:") || lane.startsWith("session:probe-");
|
||||
if (!isProbeLane) {
|
||||
if (!isProbeLane && !isExpectedNonErrorLaneFailure(err)) {
|
||||
diag.error(
|
||||
`lane task error: lane=${lane} durationMs=${Date.now() - startTime} error="${String(err)}"`,
|
||||
);
|
||||
} else if (!isProbeLane) {
|
||||
diag.debug(
|
||||
`lane task interrupted: lane=${lane} durationMs=${Date.now() - startTime} reason="${String(err)}"`,
|
||||
);
|
||||
}
|
||||
if (completedCurrentGeneration) {
|
||||
pump();
|
||||
|
||||
Reference in New Issue
Block a user