taskqueue

package
v3.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

func NewRunner

func NewRunner(db *gorm.DB, log *slog.Logger) *Runner

NewRunner 创建任务运行器

func (*Runner) Cancel added in v3.3.0

func (r *Runner) Cancel(id uint) bool

Cancel 取消正在运行的任务,返回是否命中

func (*Runner) Notify

func (r *Runner) Notify()

Notify 非阻塞通知运行器有新任务,供 Push 调用

func (*Runner) Run

func (r *Runner) Run(ctx context.Context)

Run 启动运行器

Jump to

Keyboard shortcuts

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