Skip to content

Commit

Permalink
[fix] 修复未通过启动检查的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
runs committed Jan 1, 2023
1 parent e43990b commit 421d74f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/spider/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ func lc(lifecycle fx.Lifecycle, spiderVideo *spider.Video, spiderUpdate *spider.

lifecycle.Append(fx.Hook{
OnStart: func(ctx context.Context) error {
return checkServer.Run(ctx)
go func() {
_ = checkServer.Run(ctx)
}()
return nil
},
OnStop: func(ctx context.Context) error {
if err := checkServer.Stop(ctx); err != nil {
Expand Down

0 comments on commit 421d74f

Please sign in to comment.