diff options
| author | dakkar <dakkar@thenautilus.net> | 2024-05-31 13:31:49 +0100 |
|---|---|---|
| committer | dakkar <dakkar@thenautilus.net> | 2024-05-31 13:31:49 +0100 |
| commit | 38ff7fa3e55525afbb055145609775542a7d2aa1 (patch) | |
| tree | 1ba779aa7cbe95a0eb337b3a89f0f9edcf64496b /packages/backend/src/core/chart | |
| parent | lint frontend (diff) | |
| download | sharkey-38ff7fa3e55525afbb055145609775542a7d2aa1.tar.gz sharkey-38ff7fa3e55525afbb055145609775542a7d2aa1.tar.bz2 sharkey-38ff7fa3e55525afbb055145609775542a7d2aa1.zip | |
*probably* fix FederationChart re: suspended instances
this is a misskey bug, they'll probably fix it soon, hopefully the
same way
Diffstat (limited to 'packages/backend/src/core/chart')
| -rw-r--r-- | packages/backend/src/core/chart/charts/federation.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/backend/src/core/chart/charts/federation.ts b/packages/backend/src/core/chart/charts/federation.ts index 5e4555ee96..28e441d72c 100644 --- a/packages/backend/src/core/chart/charts/federation.ts +++ b/packages/backend/src/core/chart/charts/federation.ts @@ -47,7 +47,7 @@ export default class FederationChart extends Chart<typeof schema> { // eslint-di const suspendedInstancesQuery = this.instancesRepository.createQueryBuilder('instance') .select('instance.host') - .where('instance.isSuspended = true'); + .where("instance.suspensionState != 'none'"); const pubsubSubQuery = this.followingsRepository.createQueryBuilder('f') .select('f.followerHost') @@ -89,7 +89,7 @@ export default class FederationChart extends Chart<typeof schema> { // eslint-di .select('COUNT(instance.id)') .where(`instance.host IN (${ subInstancesQuery.getQuery() })`) .andWhere(meta.blockedHosts.length === 0 ? '1=1' : 'instance.host NOT ILIKE ANY(ARRAY[:...blocked])', { blocked: meta.blockedHosts.flatMap(x => [x, `%.${x}`]) }) - .andWhere('instance.isSuspended = false') + .andWhere("instance.suspensionState = 'none'") .andWhere('instance.isNotResponding = false') .getRawOne() .then(x => parseInt(x.count, 10)), @@ -97,7 +97,7 @@ export default class FederationChart extends Chart<typeof schema> { // eslint-di .select('COUNT(instance.id)') .where(`instance.host IN (${ pubInstancesQuery.getQuery() })`) .andWhere(meta.blockedHosts.length === 0 ? '1=1' : 'instance.host NOT ILIKE ANY(ARRAY[:...blocked])', { blocked: meta.blockedHosts.flatMap(x => [x, `%.${x}`]) }) - .andWhere('instance.isSuspended = false') + .andWhere("instance.suspensionState = 'none'") .andWhere('instance.isNotResponding = false') .getRawOne() .then(x => parseInt(x.count, 10)), |