Remove webhook rate limit cache

The move to DSharpPlus makes it unnecessary, as D#+ can actually do webhook invocations on its own.
This commit is contained in:
Ske
2020-05-01 00:00:33 +02:00
parent 042327d4aa
commit 546cb7f97a
5 changed files with 3 additions and 147 deletions

View File

@@ -24,13 +24,12 @@ namespace PluralKit.Bot
private IDataStore _data;
private WebhookCacheService _webhookCache;
private WebhookRateLimitService _webhookRateLimitCache;
private DbConnectionCountHolder _countHolder;
private ILogger _logger;
public PeriodicStatCollector(DiscordShardedClient client, IMetrics metrics, ILogger logger, WebhookCacheService webhookCache, DbConnectionCountHolder countHolder, IDataStore data, CpuStatService cpu, WebhookRateLimitService webhookRateLimitCache)
public PeriodicStatCollector(DiscordShardedClient client, IMetrics metrics, ILogger logger, WebhookCacheService webhookCache, DbConnectionCountHolder countHolder, IDataStore data, CpuStatService cpu)
{
_client = client;
_metrics = metrics;
@@ -38,7 +37,6 @@ namespace PluralKit.Bot
_countHolder = countHolder;
_data = data;
_cpu = cpu;
_webhookRateLimitCache = webhookRateLimitCache;
_logger = logger.ForContext<PeriodicStatCollector>();
}
@@ -99,7 +97,6 @@ namespace PluralKit.Bot
// Other shiz
_metrics.Measure.Gauge.SetValue(BotMetrics.WebhookCacheSize, _webhookCache.CacheSize);
_metrics.Measure.Gauge.SetValue(BotMetrics.WebhookRateLimitCacheSize, _webhookRateLimitCache.CacheSize);
stopwatch.Stop();
_logger.Information("Updated metrics in {Time}", stopwatch.ElapsedDuration());