collector

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: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// complete subtask routine limit
	SubtaskRoutineCountDefaultLimit = 300
	SubtaskRoutineLimitEnvName      = "SUBTASK_ROUTINE_LIMIT"
)
View Source
const (
	MaxSubtaskElemCount = 10000
	MaxCountPerTime     = 10
)

Variables

This section is empty.

Functions

func CollectorRequestHandler

func CollectorRequestHandler(results []taskmodel.SubtaskResult) error

handle collector requests

func CompleteSubtaskRoutine

func CompleteSubtaskRoutine()

to complete subtask

func InsertSubtask

func InsertSubtask(result *taskmodel.SubtaskResult)

func InsertSubtaskList

func InsertSubtaskList(newElems *[]*SubtaskElem)

func InsertSubtaskResults

func InsertSubtaskResults(results []taskmodel.SubtaskResult)

func PopSubtaskList

func PopSubtaskList(retList *[]*SubtaskElem)

func SetSubtaskResult

func SetSubtaskResult(
	subtaskId taskmodel.SubtaskIdType,
	result *taskmodel.SubtaskResult,
	ppipeline *redis.Pipeliner,
) error

Types

type SubtaskElem

type SubtaskElem struct {
	Result     *taskmodel.SubtaskResult
	InsertTime time.Time
}

Jump to

Keyboard shortcuts

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