MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / markPluginTimedOut

Function markPluginTimedOut

src/lib/loadPlugins.js:191–207  ·  view source on GitHub ↗
(pluginId, pluginState)

Source from the content-addressed store, hash-verified

189}
190
191function markPluginTimedOut(pluginId, pluginState) {
192 BROKEN_PLUGINS.set(pluginId, {
193 error: "Plugin load timeout",
194 timestamp: Date.now(),
195 });
196
197 setTimeout(async () => {
198 try {
199 if (pluginState.settled || LOADED_PLUGINS.has(pluginId)) return;
200 await markPluginBroken(pluginId, new Error("Plugin load timeout"));
201 } catch (error) {
202 console.error(`Failed to disable timed out plugin ${pluginId}:`, error);
203 window.log("error", `Failed to disable timed out plugin ${pluginId}:`);
204 window.log("error", error);
205 }
206 }, PLUGIN_DISABLE_TIMEOUT - PLUGIN_LOAD_TIMEOUT);
207}
208
209function updatePluginDisabled(pluginId, disabled) {
210 const updatePromise = pluginDisabledUpdateQueue

Callers 1

loadPluginWithTimeoutFunction · 0.85

Calls 4

markPluginBrokenFunction · 0.85
setMethod · 0.80
logMethod · 0.80
errorMethod · 0.45

Tested by

no test coverage detected