Documentation ¶
Index ¶
- Constants
- func ExecDb(ip string, port int64, taskReq *utils.DbTaskRequest) (string, error)
- func SendNotification(taskModel models.Task, taskResult TaskResult)
- func Stop(ip string, port int64, id int64)
- type ConcurrencyQueue
- type DataBaseHandler
- type HTTPHandler
- type Handler
- type Instance
- type RPCHandler
- type Server
- type Task
- func (task Task) Add(taskModel models.Task)
- func (task Task) BatchAdd(tasks []models.Task)
- func (task Task) Initialize()
- func (task Task) NextRunTime(taskModel models.Task) time.Time
- func (task Task) NextRunTimeWeb(taskModel models.Rtask) time.Time
- func (task Task) Remove(id int)
- func (task Task) RemoveAndAdd(taskModel models.Task)
- func (task Task) Run(taskModel models.Task)
- func (task Task) Stop(ip string, port int64, id int64)
- func (task Task) WaitAndExit()
- type TaskCount
- type TaskResult
Constants ¶
View Source
const HttpExecTimeout = 300
http任务执行时间不超过300秒
Variables ¶
This section is empty.
Functions ¶
func SendNotification ¶
func SendNotification(taskModel models.Task, taskResult TaskResult)
发送任务结果通知
Types ¶
type ConcurrencyQueue ¶
type ConcurrencyQueue struct {
// contains filtered or unexported fields
}
并发队列
func (*ConcurrencyQueue) Add ¶
func (cq *ConcurrencyQueue) Add()
func (*ConcurrencyQueue) Done ¶
func (cq *ConcurrencyQueue) Done()
type Server ¶
type Server struct{}
func (Server) DbRun ¶
func (s Server) DbRun(ctx context.Context, req *utils.DbTaskRequest) (*utils.DbTaskResponse, error)
func (Server) Run ¶
func (s Server) Run(ctx context.Context, req *pb.TaskRequest) (*pb.TaskResponse, error)
type TaskResult ¶
Click to show internal directories.
Click to hide internal directories.