taskmgmt

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AfterTaskCompleted

func AfterTaskCompleted(taskRecord *dbdef.DBTaskRecord) error

任务完成时,执行任务类型的完成回调

func CancelTask

func CancelTask(taskId taskmodel.TaskIdType) error

停止正在运行中的任务

func CreateTask

func CreateTask(taskType uint32, param *taskmodel.TaskParam) (taskmodel.TaskIdType, error)

创建任务

func GetTaskStatus

func GetTaskStatus(taskId taskmodel.TaskIdType, status *taskmodel.TaskStatusData) error

查询任务的运行状态

func MonitorCompletedTask

func MonitorCompletedTask()

<<monitor_completed_task>> 检查并处理已完成队列中的任务

func MonitorTaskTableRoutine

func MonitorTaskTableRoutine()

监视任务表中的任务是否正常

func MonitorTaskTimeout

func MonitorTaskTimeout()

<<monitor_task_timeout >> 用于检查执行超时的任务

func PauseTask

func PauseTask(taskId taskmodel.TaskIdType) error

暂停任务

func RefillTaskParam

func RefillTaskParam(
	taskId taskmodel.TaskIdType,
	taskParam *taskmodel.TaskParam,
) error

重新填写任务结构

func RemoveFromRunningList

func RemoveFromRunningList(taskId taskmodel.TaskIdType) error

从运行中任务列表中删除任务

func ResumeTask

func ResumeTask(taskId taskmodel.TaskIdType) error

恢复暂停中的任务

func TaskCreationRoutine

func TaskCreationRoutine(
	taskId taskmodel.TaskIdType,
	taskType uint32,
	taskParam *taskmodel.TaskParam,
)

任务创建协程

Types

This section is empty.

Jump to

Keyboard shortcuts

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