generator

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

Documentation

Index

Constants

View Source
const (
	GenerationCountDefaultLimit = 200
	GenerationCountLimitEnv     = "GENERATION_ROUTINE_LIMIT"
)

Variables

This section is empty.

Functions

func AddTaskToScheduler

func AddTaskToScheduler(
	taskId taskmodel.TaskIdType,
	groupName string,
	taskType uint32,
	priority uint32,
) error

将文件添加到调度队列中

func CheckGenerationStatus

func CheckGenerationStatus(taskId taskmodel.TaskIdType, toGenerate *bool, currentStep *uint32) error

检查任务生成的状态

func Decr

func Decr()

减少正在生成的例程数

func FinishGeneration

func FinishGeneration(taskId taskmodel.TaskIdType) error

完成任务生成操作

func GenerationMainLoop

func GenerationMainLoop(
	taskId taskmodel.TaskIdType,
	createParam *tasklogicdef.TaskCreateParam,
)

任务插件的生成逻辑

func Incr

func Incr()

增加正在生成的例程数

func IncrIfNotFull

func IncrIfNotFull() bool

如果当前实例生成的任务数未超过上限,增加计数 返回是否成功增加计数

func InitGeneration

func InitGeneration(taskId taskmodel.TaskIdType, step *uint32) error

func IsFull

func IsFull() bool

检查当前实例生成的任务数是否超过上限

func MonitorTaskGenerationRoutine

func MonitorTaskGenerationRoutine()

monitor_task_generation

func RefreshTaskGenerationStep

func RefreshTaskGenerationStep(taskId taskmodel.TaskIdType, step uint32) error

更新生成的step值

func StartTaskGenerationRoutine

func StartTaskGenerationRoutine()

协程, 检查并处理要生成的任务,执行生成操作

func TaskGenerationRoutine

func TaskGenerationRoutine(taskId taskmodel.TaskIdType, toRecover bool)

任务的生成例程

Types

This section is empty.

Jump to

Keyboard shortcuts

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