@@ -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)) {
|
||||
|
||||
@@ -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,
|
||||
})
|
||||
|
||||
@@ -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 })
|
||||
|
||||
Reference in New Issue
Block a user