mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 11:59:48 +00:00
Improved parallel plugin management
This commit is contained in:
parent
1c4da1c5d7
commit
42845eab90
@ -88,16 +88,19 @@ public partial class MainLayout : LayoutComponentBase, IMessageBusReceiver, IDis
|
|||||||
// and we know our data directory.
|
// and we know our data directory.
|
||||||
//
|
//
|
||||||
if(PreviewFeatures.PRE_PLUGINS_2025.IsEnabled(this.SettingsManager))
|
if(PreviewFeatures.PRE_PLUGINS_2025.IsEnabled(this.SettingsManager))
|
||||||
|
{
|
||||||
|
_ = Task.Run(async () =>
|
||||||
{
|
{
|
||||||
// Ensure that all internal plugins are present:
|
// Ensure that all internal plugins are present:
|
||||||
await PluginFactory.EnsureInternalPlugins();
|
await PluginFactory.EnsureInternalPlugins();
|
||||||
|
|
||||||
// Load (but not start) all plugins, without waiting for them:
|
// Load (but not start) all plugins, without waiting for them:
|
||||||
var pluginLoadingTimeout = new CancellationTokenSource(TimeSpan.FromSeconds(5));
|
var pluginLoadingTimeout = new CancellationTokenSource(TimeSpan.FromSeconds(5));
|
||||||
_ = PluginFactory.LoadAll(pluginLoadingTimeout.Token);
|
await PluginFactory.LoadAll(pluginLoadingTimeout.Token);
|
||||||
|
|
||||||
// Set up hot reloading for plugins:
|
// Set up hot reloading for plugins:
|
||||||
PluginFactory.SetUpHotReloading();
|
PluginFactory.SetUpHotReloading();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Register this component with the message bus:
|
// Register this component with the message bus:
|
||||||
|
Loading…
Reference in New Issue
Block a user