executorconnector

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

Documentation

Index

Constants

View Source
const ExecutorMaxPushSubtaskCount uint32 = 10

批量推送子任务的上限

View Source
const RedisRetryToPushExecutorQueue = "retry.push.to.executor.queue"

重试推送到执行器服务的队列的名称

View Source
const RetryToPushInterval = 2

Variables

View Source
var ExecutorService taskmodel.ExecutorInvoker

Functions

func AddSubtasksToRetryQueue

func AddSubtasksToRetryQueue(
	subtasks *[]taskmodel.SubtaskBody,
) error

func ExecSubtasks

func ExecSubtasks(
	taskId taskmodel.TaskIdType,
	subtasks *[]taskmodel.SubtaskBody,
) error

执行子任务列表 传入的子任务都属于同一个任务

func PushBatchSubtaskToExecutor

func PushBatchSubtaskToExecutor(
	subtasks []taskmodel.SubtaskBody,
	retFailedSubtasks *[]taskmodel.SubtaskBody,
) error

将一批子任务发送给执行器服务

func PushToExecutor

func PushToExecutor(
	subtasks *[]taskmodel.SubtaskBody,
	failedSubtasks *[]taskmodel.SubtaskBody,
) error

将子任务分批发送给执行器服务

func RetryPushToExecutorRoutine

func RetryPushToExecutorRoutine()

重试例程 重试将子任务推送给执行器服务

Types

type RetrySubtaskData

type RetrySubtaskData struct {
	taskmodel.SubtaskBody
	ExpiredAt time.Time `json:"expired_at"` // 子任务重试的截止时间
}

Jump to

Keyboard shortcuts

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