mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 22:26:31 +00:00
throttle reimplemented
This commit is contained in:
@@ -8,7 +8,6 @@ using Azaion.Common.DTO;
|
||||
using Azaion.Common.DTO.Config;
|
||||
using Azaion.Common.Extensions;
|
||||
using Azaion.Common.Services;
|
||||
using Azaion.CommonSecurity;
|
||||
using Azaion.CommonSecurity.Services;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Options;
|
||||
@@ -130,13 +129,14 @@ public partial class MainSuite
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private async Task SaveUserSettings()
|
||||
{
|
||||
await ThrottleExt.Throttle(() =>
|
||||
ThrottleExt.Throttle(() =>
|
||||
{
|
||||
_configUpdater.Save(_appConfig);
|
||||
return Task.CompletedTask;
|
||||
}, TimeSpan.FromSeconds(2));
|
||||
}, SaveConfigTaskId, TimeSpan.FromSeconds(2));
|
||||
}
|
||||
|
||||
private void OnFormClosed(object? sender, EventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user