From f70ff5c0538a7c00089d27ac6013e7ba298024b4 Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 30 Aug 2024 18:50:01 +1200 Subject: [PATCH] increased delay to 2500, renamed method --- .../Administration/DangerousCommands/CleanupCommands.cs | 4 ++-- .../Administration/DangerousCommands/CleanupService.cs | 2 +- .../DangerousCommands/_common/ICleanupService.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs index 2b413ca..ada76bd 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupCommands.cs @@ -62,9 +62,9 @@ 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 _svc.StartLeavingUnkeptServers(shardId); await Task.Delay(2250 * 1000); } diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs index 9d339d9..dd269bc 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/CleanupService.cs @@ -237,7 +237,7 @@ public sealed class CleanupService : ICleanupService, IReadyExecutor, IEService 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) diff --git a/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs b/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs index 318197c..8988f32 100644 --- a/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs +++ b/src/EllieBot/Modules/Administration/DangerousCommands/_common/ICleanupService.cs @@ -5,5 +5,5 @@ public interface ICleanupService Task DeleteMissingGuildDataAsync(); Task KeepGuild(ulong guildId); Task GetKeptGuildCount(); - Task LeaveUnkeptServers(int shardId); + Task StartLeavingUnkeptServers(int shardId); } \ No newline at end of file