async

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: May 7, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTask

func NewTask() task.Task

NewTask create new Task with default collection name.

func NewWorker

func NewWorker() task.Worker

NewWorker create new Task worker with default collection name.

Types

type Task

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

Task is task adaptor for github.com/RichardKnop/machinery

func (*Task) AddTask

func (t *Task) AddTask(param *task.Param, onSuccess []*task.Param, onError []*task.Param, callbacks ...task.CallbackFunc) error

AddTask - add new task

func (*Task) Run

func (t *Task) Run(chain bool) error

Run - run all task

func (*Task) StartAndGC

func (t *Task) StartAndGC(cfg task.Config) error

StartAndGC start task adapter.

func (*Task) Stop

func (t *Task) Stop() error

Stop - stop all task

type Worker

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

Worker - worker type define

func (*Worker) Close

func (w *Worker) Close() error

Close - close worker

func (*Worker) Run

func (w *Worker) Run() error

Run - run worker

func (*Worker) StartAndGC

func (w *Worker) StartAndGC(cfg task.Config) error

StartAndGC start task worker adapter.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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