diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2019-02-08 16:58:57 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-08 16:58:57 +0900 |
| commit | 56275bcfcbd1366b0e96b79915e810baed0548bb (patch) | |
| tree | b35c8a6bd15ef8046c00119f0271808970f4f939 /src/queue/processors/http/deliver.ts | |
| parent | Supress logs during test (diff) | |
| download | sharkey-56275bcfcbd1366b0e96b79915e810baed0548bb.tar.gz sharkey-56275bcfcbd1366b0e96b79915e810baed0548bb.tar.bz2 sharkey-56275bcfcbd1366b0e96b79915e810baed0548bb.zip | |
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
Diffstat (limited to 'src/queue/processors/http/deliver.ts')
| -rw-r--r-- | src/queue/processors/http/deliver.ts | 5 |
1 files changed, 5 insertions, 0 deletions
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<void> => { const { host } = new URL(job.data.to); @@ -19,6 +20,8 @@ export default async (job: bq.Job, done: any): Promise<void> => { latestStatus: 200 } }); + + instanceChart.requestSent(i.host, true); }); done(); @@ -31,6 +34,8 @@ export default async (job: bq.Job, done: any): Promise<void> => { latestStatus: res != null && res.hasOwnProperty('statusCode') ? res.statusCode : null } }); + + instanceChart.requestSent(i.host, false); }); if (res != null && res.hasOwnProperty('statusCode')) { |