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
This commit is contained in:
@ -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')) {
|
||||
|
@ -10,6 +10,7 @@ import { publishApLogStream } from '../../../services/stream';
|
||||
import Logger from '../../../misc/logger';
|
||||
import { registerOrFetchInstanceDoc } from '../../../services/register-or-fetch-instance-doc';
|
||||
import Instance from '../../../models/instance';
|
||||
import instanceChart from '../../../services/chart/instance';
|
||||
|
||||
const logger = new Logger('inbox');
|
||||
|
||||
@ -128,6 +129,8 @@ export default async (job: bq.Job, done: any): Promise<void> => {
|
||||
latestRequestReceivedAt: new Date()
|
||||
}
|
||||
});
|
||||
|
||||
instanceChart.requestReceived(i.host);
|
||||
});
|
||||
|
||||
// アクティビティを処理
|
||||
|
Reference in New Issue
Block a user