forked from mirrors/misskey
enhance(backend): チャートの処理を一つずつ行うことでDBの同時接続とタイムアウトを削減 (#15239)
* sync charts one-at-a-time to reduce database contention and timeouts * fix merge resolve failure * Update Changelog * update changelog * add comments --------- Co-authored-by: Hazelnoot <acomputerdog@gmail.com>
This commit is contained in:
@@ -29,13 +29,12 @@ export class ResyncChartsProcessorService {
|
||||
public async process(): Promise<void> {
|
||||
this.logger.info('Resync charts...');
|
||||
|
||||
// DBへの同時接続を避けるためにPromise.allを使わずひとつずつ実行する
|
||||
// TODO: ユーザーごとのチャートも更新する
|
||||
// TODO: インスタンスごとのチャートも更新する
|
||||
await Promise.all([
|
||||
this.driveChart.resync(),
|
||||
this.notesChart.resync(),
|
||||
this.usersChart.resync(),
|
||||
]);
|
||||
await this.driveChart.resync();
|
||||
await this.notesChart.resync();
|
||||
await this.usersChart.resync();
|
||||
|
||||
this.logger.succ('All charts successfully resynced.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user