From 4d0859ce7f33a02bc7242c8a9f22ce253ff9f7c0 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 3 Jan 2023 09:03:04 +0900 Subject: [PATCH] drop latestStatus of instance --- .../migration/1672704136584-remove-latestStatus.js | 11 +++++++++++ packages/backend/src/models/entities/Instance.ts | 8 -------- .../src/queue/processors/DeliverProcessorService.ts | 2 -- packages/frontend/src/pages/instance-info.vue | 4 ---- 4 files changed, 11 insertions(+), 14 deletions(-) create mode 100644 packages/backend/migration/1672704136584-remove-latestStatus.js diff --git a/packages/backend/migration/1672704136584-remove-latestStatus.js b/packages/backend/migration/1672704136584-remove-latestStatus.js new file mode 100644 index 000000000..937c2fe8f --- /dev/null +++ b/packages/backend/migration/1672704136584-remove-latestStatus.js @@ -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`); + } +} diff --git a/packages/backend/src/models/entities/Instance.ts b/packages/backend/src/models/entities/Instance.ts index 40d964dec..8092f67c8 100644 --- a/packages/backend/src/models/entities/Instance.ts +++ b/packages/backend/src/models/entities/Instance.ts @@ -59,14 +59,6 @@ export class Instance { }) public followersCount: number; - /** - * 直近のリクエスト送信時のHTTPステータスコード - */ - @Column('integer', { - nullable: true, - }) - public latestStatus: number | null; - /** * 直近のリクエスト受信日時 */ diff --git a/packages/backend/src/queue/processors/DeliverProcessorService.ts b/packages/backend/src/queue/processors/DeliverProcessorService.ts index 571b9e904..fcff3a0e2 100644 --- a/packages/backend/src/queue/processors/DeliverProcessorService.ts +++ b/packages/backend/src/queue/processors/DeliverProcessorService.ts @@ -85,7 +85,6 @@ export class DeliverProcessorService { // Update stats this.federatedInstanceService.registerOrFetchInstanceDoc(host).then(i => { this.instancesRepository.update(i.id, { - latestStatus: 200, isNotResponding: false, }); @@ -101,7 +100,6 @@ export class DeliverProcessorService { // Update stats this.federatedInstanceService.registerOrFetchInstanceDoc(host).then(i => { this.instancesRepository.update(i.id, { - latestStatus: res instanceof StatusError ? res.statusCode : null, isNotResponding: true, }); diff --git a/packages/frontend/src/pages/instance-info.vue b/packages/frontend/src/pages/instance-info.vue index 23705cb22..55771b0e3 100644 --- a/packages/frontend/src/pages/instance-info.vue +++ b/packages/frontend/src/pages/instance-info.vue @@ -40,10 +40,6 @@ - - - -