forked from mirrors/misskey
enhance: improve federation chart
This commit is contained in:
@@ -14,7 +14,7 @@ export default class PerUserDriveChart extends Chart<typeof schema> {
|
||||
}
|
||||
|
||||
@autobind
|
||||
protected async queryCurrentState(group: string): Promise<Partial<KVs<typeof schema>>> {
|
||||
protected async tickMajor(group: string): Promise<Partial<KVs<typeof schema>>> {
|
||||
const [count, size] = await Promise.all([
|
||||
DriveFiles.count({ userId: group }),
|
||||
DriveFiles.calcDriveUsageOf(group),
|
||||
@@ -26,6 +26,11 @@ export default class PerUserDriveChart extends Chart<typeof schema> {
|
||||
};
|
||||
}
|
||||
|
||||
@autobind
|
||||
protected async tickMinor(): Promise<Partial<KVs<typeof schema>>> {
|
||||
return {};
|
||||
}
|
||||
|
||||
@autobind
|
||||
public async update(file: DriveFile, isAdditional: boolean): Promise<void> {
|
||||
const fileSizeKb = file.size / 1000;
|
||||
|
||||
Reference in New Issue
Block a user