Documentation ¶
Index ¶
- Constants
- Variables
- func AddSubtasksToRetryQueue(subtasks *[]taskmodel.SubtaskBody) error
- func ExecSubtasks(taskId taskmodel.TaskIdType, subtasks *[]taskmodel.SubtaskBody) error
- func PushBatchSubtaskToExecutor(subtasks []taskmodel.SubtaskBody, retFailedSubtasks *[]taskmodel.SubtaskBody) error
- func PushToExecutor(subtasks *[]taskmodel.SubtaskBody, failedSubtasks *[]taskmodel.SubtaskBody) error
- func RetryPushToExecutorRoutine()
- type RetrySubtaskData
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
将子任务分批发送给执行器服务
Types ¶
type RetrySubtaskData ¶
type RetrySubtaskData struct { taskmodel.SubtaskBody ExpiredAt time.Time `json:"expired_at"` // 子任务重试的截止时间 }
Click to show internal directories.
Click to hide internal directories.