Artemis-RGB / Artemis.Plugins

Repository containing official Artemis plugins
Other
31 stars 37 forks source link

Auss device provider slow #53

Open piechade opened 3 years ago

piechade commented 3 years ago

The Asus device provider is too slow after the last big update and I get the following error on every boot.

Artemis.Core.ArtemisPluginException: Plugin load timeout
   at void Artemis.Core.PluginFeature.SetEnabled(bool enable, bool isAutoEnable) in D:/a/1/s/Artemis/src/Artemis.Core/Plugins/PluginFeature.cs:line 176
   at void Artemis.Core.Services.PluginManagementService.EnablePluginFeature(PluginFeature pluginFeature, bool saveState, bool isAutoEnable) in D:/a/1/s/Artemis/src/Artemis.Core/Services/PluginManagementService.cs:line 586
   at void Artemis.Core.Services.PluginManagementService.EnablePlugin(Plugin plugin, bool saveState, bool ignorePluginLock) in D:/a/1/s/Artemis/src/Artemis.Core/Services/PluginManagementService.cs:line 406
piechade commented 3 years ago

This logic can fix it. I'm running perfect since days with it.

public void PerformHealthCheck()
        {
            var lightingServiceRunning = Process.GetProcessesByName("LightingService").Length != 0;

            while (!lightingServiceRunning)
            {
                Thread.Sleep(1000);
                lightingServiceRunning = Process.GetProcessesByName("LightingService").Length != 0;
            }
        }