mirror of https://github.com/halo-dev/halo
Remove Async annotation on event listeners
parent
fdff4640cd
commit
f9be43731d
|
@ -74,6 +74,8 @@ public class CommentEventListener {
|
|||
// Get postComment id
|
||||
PostComment postComment = postCommentService.getById(newEvent.getCommentId());
|
||||
|
||||
log.debug("Got post comment: [{}]", postComment);
|
||||
|
||||
Post post = postService.getById(postComment.getPostId());
|
||||
|
||||
StrBuilder url = new StrBuilder(optionService.getBlogBaseUrl())
|
||||
|
@ -86,6 +88,8 @@ public class CommentEventListener {
|
|||
} else if (newEvent.getSource() instanceof SheetService) {
|
||||
SheetComment sheetComment = sheetCommentService.getById(newEvent.getCommentId());
|
||||
|
||||
log.debug("Got sheet comment: [{}]", sheetComment);
|
||||
|
||||
Sheet sheet = sheetService.getById(sheetComment.getPostId());
|
||||
|
||||
StrBuilder url = new StrBuilder(optionService.getBlogBaseUrl())
|
||||
|
@ -98,6 +102,8 @@ public class CommentEventListener {
|
|||
} else if (newEvent.getSource() instanceof JournalService) {
|
||||
JournalComment journalComment = journalCommentService.getById(newEvent.getCommentId());
|
||||
|
||||
log.debug("Got journal comment: [{}]", journalComment);
|
||||
|
||||
Journal journal = journalService.getById(journalComment.getPostId());
|
||||
|
||||
StrBuilder url = new StrBuilder(optionService.getBlogBaseUrl())
|
||||
|
|
|
@ -49,7 +49,6 @@ public class FreemarkerConfigAwareListener {
|
|||
this.userService = userService;
|
||||
}
|
||||
|
||||
@Async
|
||||
@EventListener
|
||||
@Order(Ordered.HIGHEST_PRECEDENCE + 1)
|
||||
public void onApplicationStartedEvent(ApplicationStartedEvent applicationStartedEvent) throws TemplateModelException {
|
||||
|
@ -60,7 +59,6 @@ public class FreemarkerConfigAwareListener {
|
|||
loadUserConfig();
|
||||
}
|
||||
|
||||
@Async
|
||||
@EventListener
|
||||
public void onThemeActivatedEvent(ThemeActivatedEvent themeActivatedEvent) throws TemplateModelException {
|
||||
log.debug("Received theme activated event");
|
||||
|
@ -68,7 +66,6 @@ public class FreemarkerConfigAwareListener {
|
|||
loadThemeConfig();
|
||||
}
|
||||
|
||||
@Async
|
||||
@EventListener
|
||||
public void onUserUpdate(UserUpdatedEvent event) throws TemplateModelException {
|
||||
log.debug("Received user updated event, user id: [{}]", event.getUserId());
|
||||
|
@ -76,7 +73,6 @@ public class FreemarkerConfigAwareListener {
|
|||
loadUserConfig();
|
||||
}
|
||||
|
||||
@Async
|
||||
@EventListener
|
||||
public void onOptionUpdate(OptionUpdatedEvent event) throws TemplateModelException {
|
||||
log.debug("Received option updated event");
|
||||
|
|
|
@ -22,13 +22,11 @@ public class ThemeUpdatedListener {
|
|||
this.cacheStore = cacheStore;
|
||||
}
|
||||
|
||||
@Async
|
||||
@EventListener
|
||||
public void onApplicationEvent(ThemeUpdatedEvent event) {
|
||||
cacheStore.delete(ThemeService.THEMES_CACHE_KEY);
|
||||
}
|
||||
|
||||
@Async
|
||||
@EventListener
|
||||
public void onOptionUpdatedEvent(OptionUpdatedEvent optionUpdatedEvent) {
|
||||
cacheStore.delete(ThemeService.THEMES_CACHE_KEY);
|
||||
|
|
Loading…
Reference in New Issue