delete needless instance drive columns
This commit is contained in:
parent
ec64b5ea0b
commit
513c83e374
7 changed files with 13 additions and 30 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue