1
Fork 0
mirror of https://gitlab.com/Kwoth/nadekobot.git synced 2024-10-02 12:09:07 +00:00

fix: increased delay to 2500, renamed method

This commit is contained in:
Kwoth 2024-08-29 11:50:42 +00:00
parent 79c2dfec2d
commit 2b12269917
3 changed files with 5 additions and 5 deletions

View file

@ -62,10 +62,10 @@ public partial class Administration
if (!response)
return;
for (var i = startShardId; i < _creds.GetCreds().TotalShards; i++)
for (var shardId = startShardId; shardId < _creds.GetCreds().TotalShards; shardId++)
{
await _svc.LeaveUnkeptServers(i);
await Task.Delay(2250 * 1000);
await _svc.StartLeavingUnkeptServers(shardId);
await Task.Delay(2500 * 1000);
}
await ctx.OkAsync();

View file

@ -237,7 +237,7 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, INService
return await table.CountAsync();
}
public async Task LeaveUnkeptServers(int shardId)
public async Task StartLeavingUnkeptServers(int shardId)
=> await _pubSub.Pub(_keepTriggerKey, shardId);
private ValueTask OnKeepReport(KeepReport report)

View file

@ -5,5 +5,5 @@ public interface ICleanupService
Task<KeepResult?> DeleteMissingGuildDataAsync();
Task<bool> KeepGuild(ulong guildId);
Task<int> GetKeptGuildCount();
Task LeaveUnkeptServers(int shardId);
Task StartLeavingUnkeptServers(int shardId);
}