task_manager

package
v1.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrTaskStart         = "task start failed"
	ErrTaskAlreadyAttach = "task already attached"
	ErrTaskTimeout       = "task run timeout"
)
View Source
const (
	Created status = iota
	// Started
	Stopped
	Running
	Done
	Exited // goroutine被回收强制停止
	Unknown
)
View Source
const EmptyName = ""
View Source
const (
	TaskManagerPrefix = "[Task Manager]"
)

Variables

View Source
var TaskGroup []interface{}
View Source
var TaskManager taskManager

Functions

func GetAllBackgroundTasks

func GetAllBackgroundTasks() []*cron.OneTicker

func GetSetofTasks

func GetSetofTasks()

GetSetofTasks 任务去重处理,理论上不存在重复的uuid 仅针对Task

func ListAllTasks

func ListAllTasks() ([]string, error)

ListAllTasks 列出全部任务

func NewTask

func NewTask(name string, timeout int) *task

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL