mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
18 lines
256 B
Go
18 lines
256 B
Go
package msg_handler
|
|
|
|
import (
|
|
"crawlab/constants"
|
|
"crawlab/utils"
|
|
)
|
|
|
|
type Task struct {
|
|
msg NodeMessage
|
|
}
|
|
|
|
func (t *Task) Handle() error {
|
|
// 取消任务
|
|
ch := utils.TaskExecChanMap.ChanBlocked(t.msg.TaskId)
|
|
ch <- constants.TaskCancel
|
|
return nil
|
|
}
|