|
|
@ -9,7 +9,7 @@ import ( |
|
|
|
// 完成单次任务
|
|
|
|
func DoTask(dbname, siteid, userId, task_type string, url ...string) (bool, error) { |
|
|
|
|
|
|
|
if dbname == "" || userId == "" || task_type == ""{ |
|
|
|
if dbname == "" || userId == "" || task_type == "" { |
|
|
|
return false, errors.New("参数错误") |
|
|
|
} |
|
|
|
|
|
|
@ -60,9 +60,9 @@ func DoTask(dbname, siteid, userId, task_type string, url ...string) (bool, erro |
|
|
|
} |
|
|
|
|
|
|
|
// 完成循环类任务
|
|
|
|
func DoCycleTask(dbname, siteid, userId, task_id string, url ...string) (bool, error) { |
|
|
|
func DoCycleTask(dbname, siteid, userId, task_id, task_category string, url ...string) (bool, error) { |
|
|
|
|
|
|
|
if dbname == "" || userId == "" || task_id == ""{ |
|
|
|
if dbname == "" || userId == "" || task_id == "" { |
|
|
|
return false, errors.New("参数错误") |
|
|
|
} |
|
|
|
|
|
|
@ -77,6 +77,7 @@ func DoCycleTask(dbname, siteid, userId, task_id string, url ...string) (bool, e |
|
|
|
data.SiteId = siteid |
|
|
|
data.UserId = userId |
|
|
|
data.TaskId = task_id |
|
|
|
data.TaskCategroy = task_category |
|
|
|
|
|
|
|
req, err := SetReqData(data) |
|
|
|
if err != nil { |
|
|
|