From 56275bcfcbd1366b0e96b79915e810baed0548bb Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 8 Feb 2019 16:58:57 +0900 Subject: Introduce per-instance chart (#4183) * Introduce per-instance chart * Implement chart view in client * Handle note deleting * More chart srcs * Add drive stats * Improve drive stats * Fix bug * Add icon --- src/queue/processors/http/deliver.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/queue/processors/http/deliver.ts') diff --git a/src/queue/processors/http/deliver.ts b/src/queue/processors/http/deliver.ts index 82dcf06ad4..6d24cd2634 100644 --- a/src/queue/processors/http/deliver.ts +++ b/src/queue/processors/http/deliver.ts @@ -4,6 +4,7 @@ import request from '../../../remote/activitypub/request'; import { queueLogger } from '../../logger'; import { registerOrFetchInstanceDoc } from '../../../services/register-or-fetch-instance-doc'; import Instance from '../../../models/instance'; +import instanceChart from '../../../services/chart/instance'; export default async (job: bq.Job, done: any): Promise => { const { host } = new URL(job.data.to); @@ -19,6 +20,8 @@ export default async (job: bq.Job, done: any): Promise => { latestStatus: 200 } }); + + instanceChart.requestSent(i.host, true); }); done(); @@ -31,6 +34,8 @@ export default async (job: bq.Job, done: any): Promise => { latestStatus: res != null && res.hasOwnProperty('statusCode') ? res.statusCode : null } }); + + instanceChart.requestSent(i.host, false); }); if (res != null && res.hasOwnProperty('statusCode')) { -- cgit v1.2.3-freya