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:
@@ -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());
|
||||
|
Reference in New Issue
Block a user