feat(fs): fs change event notification via SSE / show panic stack trace in task queue

This commit is contained in:
Aaron Liu
2025-12-13 14:46:25 +08:00
parent 05c68b4062
commit c01b748dfc
44 changed files with 5160 additions and 22 deletions

View File

@@ -426,3 +426,13 @@ func ListArchiveFiles(c *gin.Context) {
Data: resp,
})
}
func HandleExplorerEventsPush(c *gin.Context) {
service := ParametersFromContext[*explorer.ExplorerEventService](c, explorer.ExplorerEventParamCtx{})
err := service.HandleExplorerEventsPush(c)
if err != nil {
c.JSON(200, serializer.Err(c, err))
c.Abort()
return
}
}

View File

@@ -727,6 +727,13 @@ func initMasterRouter(dep dependency.Dep) *gin.Engine {
controllers.FromJSON[explorer.PatchViewService](explorer.PatchViewParameterCtx{}),
controllers.PatchView,
)
// Server event push
file.GET("events",
middleware.LoginRequired(),
controllers.FromQuery[explorer.ExplorerEventService](explorer.ExplorerEventParamCtx{}),
controllers.HandleExplorerEventsPush,
)
}
// 分享相关