mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
feat(bot): also cluster gateway cache on .internal
This commit is contained in:
parent
e6c4b4416e
commit
7c913c7b15
1 changed files with 2 additions and 1 deletions
|
|
@ -48,7 +48,8 @@ public class HttpDiscordCache: IDiscordCache
|
||||||
private async Task<T?> QueryCache<T>(string endpoint, ulong guildId)
|
private async Task<T?> QueryCache<T>(string endpoint, ulong guildId)
|
||||||
{
|
{
|
||||||
var cluster = _cacheEndpoint.Authority;
|
var cluster = _cacheEndpoint.Authority;
|
||||||
if (cluster.Contains(".service.consul"))
|
// todo: there should not be infra-specific code here
|
||||||
|
if (cluster.Contains(".service.consul") || cluster.Contains("process.pluralkit-gateway.internal"))
|
||||||
// int(((guild_id >> 22) % shard_count) / 16)
|
// int(((guild_id >> 22) % shard_count) / 16)
|
||||||
cluster = $"cluster{(int)(((guildId >> 22) % (ulong)_shardCount) / 16)}.{cluster}";
|
cluster = $"cluster{(int)(((guildId >> 22) % (ulong)_shardCount) / 16)}.{cluster}";
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue