定时任务添加http模式
This commit is contained in:
+36
-25
@@ -10,7 +10,12 @@ type Task struct {
|
||||
Description string `orm:"description" json:"description"`
|
||||
CronSpec string `orm:"cron_spec" json:"cronSpec"`
|
||||
Concurrent int `orm:"concurrent" json:"concurrent"`
|
||||
TaskType string `orm:"task_type" json:"taskType"`
|
||||
Command string `orm:"command" json:"command"`
|
||||
Url string `orm:"url" json:"url"`
|
||||
Method string `orm:"method" json:"method"`
|
||||
Headers string `orm:"headers" json:"headers"`
|
||||
Body string `orm:"body" json:"body"`
|
||||
Timeout int `orm:"timeout" json:"timeout"`
|
||||
ExecuteTimes int `orm:"execute_times" json:"executeTimes"`
|
||||
PrevTime int64 `orm:"prev_time" json:"prevTime"`
|
||||
@@ -27,31 +32,37 @@ type Task struct {
|
||||
|
||||
// TaskCols 字段常量
|
||||
var TaskCols = struct {
|
||||
Id, GroupId, ServerIds, ServerType, TaskName string
|
||||
Description, CronSpec, Concurrent, Command string
|
||||
Timeout, ExecuteTimes, PrevTime, Status string
|
||||
Id, GroupId, ServerIds, ServerType, TaskName string
|
||||
Description, CronSpec, Concurrent, TaskType string
|
||||
Command, Url, Method, Headers, Body string
|
||||
Timeout, ExecuteTimes, PrevTime, Status string
|
||||
IsNotify, NotifyType, NotifyTplId, NotifyUserIds string
|
||||
CreateId, UpdateId, CreateTime, UpdateTime string
|
||||
CreateId, UpdateId, CreateTime, UpdateTime string
|
||||
}{
|
||||
Id: "id",
|
||||
GroupId: "group_id",
|
||||
ServerIds: "server_ids",
|
||||
ServerType: "server_type",
|
||||
TaskName: "task_name",
|
||||
Description: "description",
|
||||
CronSpec: "cron_spec",
|
||||
Concurrent: "concurrent",
|
||||
Command: "command",
|
||||
Timeout: "timeout",
|
||||
ExecuteTimes: "execute_times",
|
||||
PrevTime: "prev_time",
|
||||
Status: "status",
|
||||
IsNotify: "is_notify",
|
||||
NotifyType: "notify_type",
|
||||
NotifyTplId: "notify_tpl_id",
|
||||
NotifyUserIds: "notify_user_ids",
|
||||
CreateId: "create_id",
|
||||
UpdateId: "update_id",
|
||||
CreateTime: "create_time",
|
||||
UpdateTime: "update_time",
|
||||
Id: "id",
|
||||
GroupId: "group_id",
|
||||
ServerIds: "server_ids",
|
||||
ServerType: "server_type",
|
||||
TaskName: "task_name",
|
||||
Description: "description",
|
||||
CronSpec: "cron_spec",
|
||||
Concurrent: "concurrent",
|
||||
TaskType: "task_type",
|
||||
Command: "command",
|
||||
Url: "url",
|
||||
Method: "method",
|
||||
Headers: "headers",
|
||||
Body: "body",
|
||||
Timeout: "timeout",
|
||||
ExecuteTimes: "execute_times",
|
||||
PrevTime: "prev_time",
|
||||
Status: "status",
|
||||
IsNotify: "is_notify",
|
||||
NotifyType: "notify_type",
|
||||
NotifyTplId: "notify_tpl_id",
|
||||
NotifyUserIds: "notify_user_ids",
|
||||
CreateId: "create_id",
|
||||
UpdateId: "update_id",
|
||||
CreateTime: "create_time",
|
||||
UpdateTime: "update_time",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user