Johann150
36a0e48e49
All checks were successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
There are still many places where import paths with `..` are used and maybe should use absolute paths also.
22 lines
638 B
TypeScript
22 lines
638 B
TypeScript
import Bull from 'bull';
|
|
|
|
import { driveChart, notesChart, usersChart } from '@/services/chart/index.js';
|
|
import { queueLogger } from '@/queue/logger.js';
|
|
|
|
const logger = queueLogger.createSubLogger('resync-charts');
|
|
|
|
export async function resyncCharts(job: Bull.Job<Record<string, unknown>>, done: any): Promise<void> {
|
|
logger.info('Resync charts...');
|
|
|
|
// TODO: ユーザーごとのチャートも更新する
|
|
// TODO: インスタンスごとのチャートも更新する
|
|
await Promise.all([
|
|
driveChart.resync(),
|
|
notesChart.resync(),
|
|
usersChart.resync(),
|
|
]);
|
|
|
|
logger.succ('All charts successfully resynced.');
|
|
done();
|
|
}
|