持续处理报警结果
()
| 20 | |
| 21 | //持续处理报警结果 |
| 22 | func (c *Controller) processStrategyResultForever() { |
| 23 | for i := 0; i < GlobalConfig.WORKER_COUNT; i++ { |
| 24 | go func() { |
| 25 | for { |
| 26 | select { |
| 27 | case result := <-c.resultPool.results: |
| 28 | lg.Debug("get task result from result pool, taskid:%s", result.TaskID) |
| 29 | c.processResult(result) |
| 30 | default: |
| 31 | time.Sleep(time.Millisecond * 100) |
| 32 | } |
| 33 | } |
| 34 | }() |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | //处理来自Inspector计算后的结果对象 |
| 39 | func (c *Controller) processResult(strategyResult *types.StrategyResult) { |
no test coverage detected