mirror of
				https://gitlab.com/Kwoth/nadekobot.git
				synced 2025-11-04 00:34:26 -05:00 
			
		
		
		
	fix: increased delay to 2500, renamed method
This commit is contained in:
		@@ -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();
 | 
			
		||||
 
 | 
			
		||||
@@ -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)
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user