Browse Source

update

master v0.1.3
lijianbin 3 years ago
parent
commit
147007c4f8
2 changed files with 9 additions and 7 deletions
  1. +4
    -3
      client.dotask.go
  2. +5
    -4
      variable.go

+ 4
- 3
client.dotask.go View File

@ -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 {


+ 5
- 4
variable.go View File

@ -10,8 +10,9 @@ type DoTaskParam struct {
}
type DoCycleTaskParam struct {
SiteId string `json:"site_id"`
Dbname string `json:"database"`
TaskId string `json:"task_id"`
UserId string `json:"user_id"`
SiteId string `json:"site_id"`
Dbname string `json:"database"`
TaskId string `json:"task_id"`
TaskCategroy string `json:"task_category"`
UserId string `json:"user_id"`
}

Loading…
Cancel
Save