drop latestStatus of instance

This commit is contained in:
syuilo 2023-01-03 09:03:04 +09:00
parent c8bd139713
commit 4d0859ce7f
4 changed files with 11 additions and 14 deletions

View File

@ -0,0 +1,11 @@
export class removeLatestStatus1672704136584 {
name = 'removeLatestStatus1672704136584'
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "latestStatus"`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "instance" ADD "latestStatus" integer`);
}
}

View File

@ -59,14 +59,6 @@ export class Instance {
}) })
public followersCount: number; public followersCount: number;
/**
* HTTPステータスコード
*/
@Column('integer', {
nullable: true,
})
public latestStatus: number | null;
/** /**
* *
*/ */

View File

@ -85,7 +85,6 @@ export class DeliverProcessorService {
// Update stats // Update stats
this.federatedInstanceService.registerOrFetchInstanceDoc(host).then(i => { this.federatedInstanceService.registerOrFetchInstanceDoc(host).then(i => {
this.instancesRepository.update(i.id, { this.instancesRepository.update(i.id, {
latestStatus: 200,
isNotResponding: false, isNotResponding: false,
}); });
@ -101,7 +100,6 @@ export class DeliverProcessorService {
// Update stats // Update stats
this.federatedInstanceService.registerOrFetchInstanceDoc(host).then(i => { this.federatedInstanceService.registerOrFetchInstanceDoc(host).then(i => {
this.instancesRepository.update(i.id, { this.instancesRepository.update(i.id, {
latestStatus: res instanceof StatusError ? res.statusCode : null,
isNotResponding: true, isNotResponding: true,
}); });

View File

@ -40,10 +40,6 @@
<template #key>{{ i18n.ts.updatedAt }}</template> <template #key>{{ i18n.ts.updatedAt }}</template>
<template #value><MkTime mode="detail" :time="instance.infoUpdatedAt"/></template> <template #value><MkTime mode="detail" :time="instance.infoUpdatedAt"/></template>
</MkKeyValue> </MkKeyValue>
<MkKeyValue oneline style="margin: 1em 0;">
<template #key>{{ i18n.ts.latestStatus }}</template>
<template #value>{{ instance.latestStatus ? instance.latestStatus : 'N/A' }}</template>
</MkKeyValue>
<MkKeyValue oneline style="margin: 1em 0;"> <MkKeyValue oneline style="margin: 1em 0;">
<template #key>{{ i18n.ts.latestRequestReceivedAt }}</template> <template #key>{{ i18n.ts.latestRequestReceivedAt }}</template>
<template #value><MkTime v-if="instance.latestRequestReceivedAt" :time="instance.latestRequestReceivedAt"/><span v-else>N/A</span></template> <template #value><MkTime v-if="instance.latestRequestReceivedAt" :time="instance.latestRequestReceivedAt"/><span v-else>N/A</span></template>