diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2022-12-04 15:03:09 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2022-12-04 15:03:09 +0900 |
| commit | bbb49457f9fb5d46402e913c92ebf77722cad6ff (patch) | |
| tree | 8ef285bcbab2c3a4a89d0a624a802d76a2864fed /packages/backend/src/queue/processors/EndedPollNotificationProcessorService.ts | |
| parent | :art: (diff) | |
| download | sharkey-bbb49457f9fb5d46402e913c92ebf77722cad6ff.tar.gz sharkey-bbb49457f9fb5d46402e913c92ebf77722cad6ff.tar.bz2 sharkey-bbb49457f9fb5d46402e913c92ebf77722cad6ff.zip | |
refactor: introduce bindThis decorator to bind this automaticaly
Diffstat (limited to 'packages/backend/src/queue/processors/EndedPollNotificationProcessorService.ts')
| -rw-r--r-- | packages/backend/src/queue/processors/EndedPollNotificationProcessorService.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/backend/src/queue/processors/EndedPollNotificationProcessorService.ts b/packages/backend/src/queue/processors/EndedPollNotificationProcessorService.ts index 2fc7fe219e..21d2dc9efc 100644 --- a/packages/backend/src/queue/processors/EndedPollNotificationProcessorService.ts +++ b/packages/backend/src/queue/processors/EndedPollNotificationProcessorService.ts @@ -8,6 +8,7 @@ import { CreateNotificationService } from '@/core/CreateNotificationService.js'; import { QueueLoggerService } from '../QueueLoggerService.js'; import type Bull from 'bull'; import type { EndedPollNotificationJobData } from '../types.js'; +import { bindThis } from '@/decorators.js'; @Injectable() export class EndedPollNotificationProcessorService { @@ -29,6 +30,7 @@ export class EndedPollNotificationProcessorService { this.logger = this.queueLoggerService.logger.createSubLogger('ended-poll-notification'); } + @bindThis public async process(job: Bull.Job<EndedPollNotificationJobData>, done: () => void): Promise<void> { const note = await this.notesRepository.findOneBy({ id: job.data.noteId }); if (note == null || !note.hasPoll) { |