diff --git a/src/modules/comment/comment.controller.ts b/src/modules/comment/comment.controller.ts index df3f35e7..10b5400c 100644 --- a/src/modules/comment/comment.controller.ts +++ b/src/modules/comment/comment.controller.ts @@ -197,14 +197,14 @@ export class CommentController { const comment = await this.commentService.createComment(id, model, ref) const commentId = comment._id.toString() - scheduleManager.batch(async () => { + scheduleManager.schedule(async () => { if (isMaster) { return } await this.commentService.appendIpLocation(commentId, ipLocation.ip) }) - scheduleManager.batch(async () => { + scheduleManager.schedule(async () => { const configs = await this.configsService.get('commentOptions') const { commentShouldAudit } = configs if (await this.commentService.checkSpam(comment)) { diff --git a/src/modules/note/note.service.ts b/src/modules/note/note.service.ts index 524beedd..d46787c4 100644 --- a/src/modules/note/note.service.ts +++ b/src/modules/note/note.service.ts @@ -185,7 +185,7 @@ export class NoteService { throw new NoContentCanBeModifiedException() } - scheduleManager.batch(async () => { + scheduleManager.schedule(async () => { this.eventManager.emit(EventBusEvents.CleanAggregateCache, null, { scope: EventScope.TO_SYSTEM, }) diff --git a/src/modules/post/post.service.ts b/src/modules/post/post.service.ts index e87fe122..c72ae396 100644 --- a/src/modules/post/post.service.ts +++ b/src/modules/post/post.service.ts @@ -160,7 +160,7 @@ export class PostService { ) await oldDocument.save() - scheduleManager.batch(async () => { + scheduleManager.schedule(async () => { const doc = await this.postModel .findById(id) .lean({ getters: true, autopopulate: true })