refactor: ⚰️ remove old db calls, add todo
This commit is contained in:
parent
bd9f28246b
commit
4b1fc747e4
|
@ -60,24 +60,6 @@ export const paramDef = {
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export default define(meta, paramDef, async () => {
|
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 notesChartData = await notesChart.getChart("hour", 1, null);
|
||||||
const notesCount =
|
const notesCount =
|
||||||
notesChartData.local.total[0] + notesChartData.remote.total[0];
|
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];
|
usersChartData.local.total[0] + usersChartData.remote.total[0];
|
||||||
const originalUsersCount = usersChartData.local.total[0];
|
const originalUsersCount = usersChartData.local.total[0];
|
||||||
const driveChartData = await driveChart.getChart("hour", 1, null);
|
const driveChartData = await driveChart.getChart("hour", 1, null);
|
||||||
|
//TODO: fixme currently returns 0
|
||||||
const driveUsageLocal = driveChartData.local.incSize[0];
|
const driveUsageLocal = driveChartData.local.incSize[0];
|
||||||
const driveUsageRemote = driveChartData.remote.incSize[0];
|
const driveUsageRemote = driveChartData.remote.incSize[0];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue