refactor: ⚰️ remove old db calls, add todo

This commit is contained in:
ThatOneCalculator 2023-06-12 01:23:53 -07:00
parent bd9f28246b
commit 4b1fc747e4
No known key found for this signature in database
GPG key ID: 8703CACD01000000

View file

@ -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];