mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-08-21 04:12:56 +00:00
Add delay to plugin hot-reload for file write completion
This commit is contained in:
parent
041cbc568b
commit
3c77625ab3
@ -46,6 +46,9 @@ public static partial class PluginFactory
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
LOG.LogInformation($"File changed ({changeType}): {args.FullPath}. Reloading plugins...");
|
LOG.LogInformation($"File changed ({changeType}): {args.FullPath}. Reloading plugins...");
|
||||||
|
|
||||||
|
// Wait for parallel writes to finish:
|
||||||
|
await Task.Delay(TimeSpan.FromSeconds(3));
|
||||||
await LoadAll();
|
await LoadAll();
|
||||||
await MessageBus.INSTANCE.SendMessage<bool>(null, Event.PLUGINS_RELOADED);
|
await MessageBus.INSTANCE.SendMessage<bool>(null, Event.PLUGINS_RELOADED);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user