From b1d2779e65c63ca19a217559aba9c0c153b7ad47 Mon Sep 17 00:00:00 2001 From: zhoujunhao <18853925545@163.com> Date: Wed, 13 Jun 2018 15:28:11 +0800 Subject: [PATCH] [ADD] add test code --- appruntimesync/clean/clean.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/appruntimesync/clean/clean.go b/appruntimesync/clean/clean.go index 1cc79c762..539e9f119 100644 --- a/appruntimesync/clean/clean.go +++ b/appruntimesync/clean/clean.go @@ -472,8 +472,8 @@ func (m *Manager) CollectingTasks() { util.Exec(m.ctx, func() error { for _, v := range m.queryResource { v(m) - fmt.Println("xx",v(m)) } + fmt.Println("收集完毕") return nil }, time.Second*24) @@ -482,7 +482,7 @@ func (m *Manager) CollectingTasks() { func (m *Manager) PerformTasks() { util.Exec(m.ctx, func() error { - + for _, v := range m.waiting { fmt.Println("vvvv",v) if v.IsTimeout() { @@ -491,7 +491,8 @@ func (m *Manager) PerformTasks() { } } } - fmt.Println("结束") + m.waiting = nil + fmt.Println("清理结束") m.waiting = nil return nil }, time.Second*12)