diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-01-03 09:00:42 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-01-03 09:00:42 +0900 |
| commit | c8bd13971355e1f2a720bdd7d5c75404833bc0bd (patch) | |
| tree | fa568c2a93a608acd0d5f2d82339b74bff00322f /packages/backend/src/core/chart | |
| parent | drop latestRequestSentAt of instance (diff) | |
| download | sharkey-c8bd13971355e1f2a720bdd7d5c75404833bc0bd.tar.gz sharkey-c8bd13971355e1f2a720bdd7d5c75404833bc0bd.tar.bz2 sharkey-c8bd13971355e1f2a720bdd7d5c75404833bc0bd.zip | |
drop lastCommunicatedAt of instance
Diffstat (limited to 'packages/backend/src/core/chart')
| -rw-r--r-- | packages/backend/src/core/chart/charts/federation.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/backend/src/core/chart/charts/federation.ts b/packages/backend/src/core/chart/charts/federation.ts index d9234e8028..b8012809f7 100644 --- a/packages/backend/src/core/chart/charts/federation.ts +++ b/packages/backend/src/core/chart/charts/federation.ts @@ -86,7 +86,7 @@ export default class FederationChart extends Chart<typeof schema> { .where(`instance.host IN (${ subInstancesQuery.getQuery() })`) .andWhere(meta.blockedHosts.length === 0 ? '1=1' : 'instance.host NOT IN (:...blocked)', { blocked: meta.blockedHosts }) .andWhere('instance.isSuspended = false') - .andWhere('instance.lastCommunicatedAt > :gt', { gt: new Date(Date.now() - (1000 * 60 * 60 * 24 * 30)) }) + .andWhere('instance.isNotResponding = false') .getRawOne() .then(x => parseInt(x.count, 10)), this.instancesRepository.createQueryBuilder('instance') @@ -94,7 +94,7 @@ export default class FederationChart extends Chart<typeof schema> { .where(`instance.host IN (${ pubInstancesQuery.getQuery() })`) .andWhere(meta.blockedHosts.length === 0 ? '1=1' : 'instance.host NOT IN (:...blocked)', { blocked: meta.blockedHosts }) .andWhere('instance.isSuspended = false') - .andWhere('instance.lastCommunicatedAt > :gt', { gt: new Date(Date.now() - (1000 * 60 * 60 * 24 * 30)) }) + .andWhere('instance.isNotResponding = false') .getRawOne() .then(x => parseInt(x.count, 10)), ]); |