refactor: introduce bindThis decorator to bind this automaticaly
This commit is contained in:
parent
e73581f715
commit
bbb49457f9
199 changed files with 969 additions and 96 deletions
|
|
@ -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(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue