mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-30 02:22:25 +00:00
Gateway: lazily resolve channel runtime
This commit is contained in:
@@ -138,6 +138,13 @@ const logDiscovery = log.child("discovery");
|
||||
const logTailscale = log.child("tailscale");
|
||||
const logChannels = log.child("channels");
|
||||
const logBrowser = log.child("browser");
|
||||
|
||||
let cachedChannelRuntime: ReturnType<typeof createPluginRuntime>["channel"] | null = null;
|
||||
|
||||
function getChannelRuntime() {
|
||||
cachedChannelRuntime ??= createPluginRuntime().channel;
|
||||
return cachedChannelRuntime;
|
||||
}
|
||||
const logHealth = log.child("health");
|
||||
const logCron = log.child("cron");
|
||||
const logReload = log.child("reload");
|
||||
@@ -575,7 +582,7 @@ export async function startGatewayServer(
|
||||
loadConfig,
|
||||
channelLogs,
|
||||
channelRuntimeEnvs,
|
||||
channelRuntime: createPluginRuntime().channel,
|
||||
resolveChannelRuntime: getChannelRuntime,
|
||||
});
|
||||
const getReadiness = createReadinessChecker({
|
||||
channelManager,
|
||||
|
||||
Reference in New Issue
Block a user