Skip to content

Commit 67e3efb

Browse files
committed
bug log++
1 parent b50ff46 commit 67e3efb

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

server/utils/cmd_Task.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ func (t *T) AddTask() {
6060
// 直接丢弃这次任务
6161
return
6262
}
63+
fmt.Println("::::发送任务->>>>>>>>")
6364
t.ch <- struct{}{}
6465
}
6566

server/utils/cmd_monitor.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,15 @@ func (w *Watch) watchFile(path string) error {
124124

125125
// chickPower: 判断是否在可控范围内
126126
func chickPower(name string) bool {
127-
return filepath.Ext(name) == ".go" || filepath.Ext(name) == ".yaml"
127+
name = filepath.Ext(name)
128+
fmt.Println(name)
129+
return name == ".go" || name == ".yaml"
128130
}
129131

130132
// addTask: 偏函数 简化发送任务
131133
func (w *Watch) addTask(t *T, name string) {
132134
if chickPower(name) {
135+
fmt.Println("Add Task->>>>>>")
133136
t.AddTask()
134137
}
135138
}

0 commit comments

Comments
 (0)