refactor: introduce bindThis decorator to bind this automaticaly
This commit is contained in:
@@ -13,6 +13,7 @@ import PerUserFollowingChart from './charts/per-user-following.js';
|
||||
import PerUserDriveChart from './charts/per-user-drive.js';
|
||||
import ApRequestChart from './charts/ap-request.js';
|
||||
import type { OnApplicationShutdown } from '@nestjs/common';
|
||||
import { bindThis } from '@/decorators.js';
|
||||
|
||||
@Injectable()
|
||||
export class ChartManagementService implements OnApplicationShutdown {
|
||||
@@ -49,6 +50,7 @@ export class ChartManagementService implements OnApplicationShutdown {
|
||||
];
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public async run() {
|
||||
// 20分おきにメモリ情報をDBに書き込み
|
||||
this.saveIntervalId = setInterval(() => {
|
||||
|
Reference in New Issue
Block a user