@@ -168,31 +168,43 @@ func (c *WikiProcessor) ProcessOpenWorkspaceEvent(ctx context.Context, event *mo
168168// ProcessEvents 处理事件记录
169169func (c * WikiProcessor ) ProcessEvents (ctx context.Context , workspacePaths []string ) error {
170170
171- codegraphStatuses := []int {
172- model .CodegraphStatusInit ,
173- model .CodegraphStatusSuccess ,
174- model .CodegraphStatusFailed ,
175- }
171+ // codegraphStatuses := []int{
172+ // model.CodegraphStatusInit,
173+ // model.CodegraphStatusSuccess,
174+ // model.CodegraphStatusFailed,
175+ // }
176176
177177 // 打开工作区事件
178- openEvents , err := c .eventRepo .GetEventsByTypeAndStatusAndWorkspaces ([]string {model .EventTypeOpenWorkspace }, workspacePaths , 10 ,
179- false , nil , codegraphStatuses )
180-
181- if err != nil {
182- c .logger .Error ("failed to get open_workspace events: %v" , err )
183- return fmt .Errorf ("failed to get open_workspace events: %w" , err )
184- }
178+ // openEvents, err := c.eventRepo.GetEventsByTypeAndStatusAndWorkspaces([]string{model.EventTypeOpenWorkspace}, workspacePaths, 10,
179+ // false, nil, codegraphStatuses)
180+ //
181+ // if err != nil {
182+ // c.logger.Error("failed to get open_workspace events: %v", err)
183+ // return fmt.Errorf("failed to get open_workspace events: %w", err)
184+ // }
185185
186- // 处理打开工作区事件
187- for _ , event := range openEvents {
188- c .convertWorkspaceFilePathToAbs (event )
189- c .logger .Info ("wiki start to process open_workspace event: %s" , event .WorkspacePath )
190- err = c .ProcessOpenWorkspaceEvent (ctx , event )
186+ // TODO 处理打开工作区事件
187+ //for _, event := range openEvents {
188+ // c.convertWorkspaceFilePathToAbs(event)
189+ // c.logger.Info("wiki start to process open_workspace event: %s", event.WorkspacePath)
190+ // err = c.ProcessOpenWorkspaceEvent(ctx, event)
191+ // if err != nil {
192+ // c.logger.Error("failed to process open_workspace event for codegraph: %v", err)
193+ // continue
194+ // }
195+ // c.logger.Info("wiki process open_workspace event successfully: %s", event.WorkspacePath)
196+ //}
197+ // TODO
198+ for _ , workspacePath := range workspacePaths {
199+ c .logger .Info ("wiki start to process open_workspace event: %s" , workspacePath )
200+ err := c .ProcessOpenWorkspaceEvent (ctx , & model.Event {
201+ WorkspacePath : workspacePath ,
202+ })
191203 if err != nil {
192204 c .logger .Error ("failed to process open_workspace event for codegraph: %v" , err )
193205 continue
194206 }
195- c .logger .Info ("wiki process open_workspace event successfully: %s" , event . WorkspacePath )
207+ c .logger .Info ("wiki process open_workspace event successfully: %s" , workspacePath )
196208 }
197209
198210 return nil
0 commit comments