mirror of
https://github.com/sim1222/misskey.git
synced 2025-08-06 16:53:58 +09:00
delete needless instance drive columns
This commit is contained in:
@ -21,14 +21,12 @@ export default class InstanceChart extends Chart<typeof schema> {
|
||||
followingCount,
|
||||
followersCount,
|
||||
driveFiles,
|
||||
//driveUsage,
|
||||
] = await Promise.all([
|
||||
Notes.count({ userHost: group }),
|
||||
Users.count({ host: group }),
|
||||
Followings.count({ followerHost: group }),
|
||||
Followings.count({ followeeHost: group }),
|
||||
DriveFiles.count({ userHost: group }),
|
||||
//DriveFiles.calcDriveUsageOfHost(group),
|
||||
]);
|
||||
|
||||
return {
|
||||
|
@ -484,8 +484,6 @@ export async function addFile({
|
||||
perUserDriveChart.update(file, true);
|
||||
if (file.userHost !== null) {
|
||||
instanceChart.updateDrive(file, true);
|
||||
Instances.increment({ host: file.userHost }, 'driveUsage', file.size);
|
||||
Instances.increment({ host: file.userHost }, 'driveFiles', 1);
|
||||
}
|
||||
|
||||
return file;
|
||||
|
@ -86,8 +86,6 @@ async function postProcess(file: DriveFile, isExpired = false) {
|
||||
perUserDriveChart.update(file, false);
|
||||
if (file.userHost !== null) {
|
||||
instanceChart.updateDrive(file, false);
|
||||
Instances.decrement({ host: file.userHost }, 'driveUsage', file.size);
|
||||
Instances.decrement({ host: file.userHost }, 'driveFiles', 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user