refactor: introduce bindThis decorator to bind this automaticaly
This commit is contained in:
@@ -7,6 +7,7 @@ import type Logger from '@/logger.js';
|
||||
import { GlobalEventService } from '@/core/GlobalEventService.js';
|
||||
import { QueueLoggerService } from '../QueueLoggerService.js';
|
||||
import type Bull from 'bull';
|
||||
import { bindThis } from '@/decorators.js';
|
||||
|
||||
@Injectable()
|
||||
export class CheckExpiredMutingsProcessorService {
|
||||
@@ -25,6 +26,7 @@ export class CheckExpiredMutingsProcessorService {
|
||||
this.logger = this.queueLoggerService.logger.createSubLogger('check-expired-mutings');
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public async process(job: Bull.Job<Record<string, unknown>>, done: () => void): Promise<void> {
|
||||
this.logger.info('Checking expired mutings...');
|
||||
|
||||
|
Reference in New Issue
Block a user