Skip to content

Commit

Permalink
fix: correct inaccurate descriptions in the extended feed doc (#42)
Browse files Browse the repository at this point in the history
### What this PR does?

移除监听 ContextClosedEvent 来清理 RSS 缓存的描述

如果插件 A 监听这个事件来清理 rss 缓存,那么当 feed 更新时会导致插件 A 发生以下错误只能重启 Halo 才能恢复

```shell
java.lang.reflect.UndeclaredThrowableException: Failed to invoke event listener method
HandlerMethod details: 
Bean [run.halo.moments.rss.RssAutoConfiguration$$SpringCGLIB$$0]
Method [public void run.halo.moments.rss.RssAutoConfiguration.onMomentUpdatedOrDeleted()]
Resolved arguments: 
of class "run/halo/feed/RssCacheClearRequested" have different types for the method signature
```

```release-note
None
```
  • Loading branch information
guqing authored Dec 5, 2024
1 parent bffc7e1 commit 43c3955
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class RssAutoConfiguration {
}

@Async
@EventListener({MomentUpdatedEvent.class, MomentDeletedEvent.class, ContextClosedEvent.class})
@EventListener({MomentUpdatedEvent.class, MomentDeletedEvent.class})
public void onMomentUpdatedOrDeleted() {
var rule = CacheClearRule.forExact("/feed/moments/rss.xml");
var event = RssCacheClearRequested.forRule(this, rule);
Expand Down

0 comments on commit 43c3955

Please sign in to comment.