mirror of
https://example.com
synced 2024-11-28 21:36:40 +09:00
refactor: ⚰️ remove old db calls, add todo
This commit is contained in:
parent
bd9f28246b
commit
4b1fc747e4
1 changed files with 1 additions and 18 deletions
|
@ -60,24 +60,6 @@ export const paramDef = {
|
|||
} as const;
|
||||
|
||||
export default define(meta, paramDef, async () => {
|
||||
// const [
|
||||
// notesCount,
|
||||
// originalNotesCount,
|
||||
// usersCount,
|
||||
// originalUsersCount,
|
||||
// reactionsCount,
|
||||
// //originalReactionsCount,
|
||||
// instances,
|
||||
// ] = await Promise.all([
|
||||
// Notes.count({ cache: 3600000 }), // 1 hour
|
||||
// Notes.count({ where: { userHost: IsNull() }, cache: 3600000 }),
|
||||
// Users.count({ cache: 3600000 }),
|
||||
// Users.count({ where: { host: IsNull() }, cache: 3600000 }),
|
||||
// NoteReactions.count({ cache: 3600000 }), // 1 hour
|
||||
// //NoteReactions.count({ where: { userHost: IsNull() }, cache: 3600000 }),
|
||||
// Instances.count({ cache: 3600000 }),
|
||||
// ]);
|
||||
|
||||
const notesChartData = await notesChart.getChart("hour", 1, null);
|
||||
const notesCount =
|
||||
notesChartData.local.total[0] + notesChartData.remote.total[0];
|
||||
|
@ -88,6 +70,7 @@ export default define(meta, paramDef, async () => {
|
|||
usersChartData.local.total[0] + usersChartData.remote.total[0];
|
||||
const originalUsersCount = usersChartData.local.total[0];
|
||||
const driveChartData = await driveChart.getChart("hour", 1, null);
|
||||
//TODO: fixme currently returns 0
|
||||
const driveUsageLocal = driveChartData.local.incSize[0];
|
||||
const driveUsageRemote = driveChartData.remote.incSize[0];
|
||||
|
||||
|
|
Loading…
Reference in a new issue