Documentation ¶
Index ¶
- Variables
- type ClusterTaskService
- func (s *ClusterTaskService) CancelDag(dag *task.Dag) error
- func (s *ClusterTaskService) CreateDagInstanceByTemplate(template *task.Template, ctx *task.TaskContext) (*task.Dag, error)
- func (s *ClusterTaskService) CreateLocalTaskInstanceByRemoteTask(remoteTask *task.RemoteTask) (int64, error)
- func (s *ClusterTaskService) FindLastMaintenanceDag() (*task.Dag, error)
- func (s *ClusterTaskService) FinishDagAsFailed(dag *task.Dag) error
- func (s *ClusterTaskService) FinishDagAsSucceed(dag *task.Dag) error
- func (s *ClusterTaskService) FinishNode(node *task.Node) error
- func (s *ClusterTaskService) FinishSubTask(subtask task.ExecutableTask, state int) error
- func (s *ClusterTaskService) GetAllUnfinishedDagInstance() ([]*task.Dag, error)
- func (s *ClusterTaskService) GetAllUnfinishedSubTasks() ([]task.ExecutableTask, error)
- func (s *ClusterTaskService) GetDagDetail(dagId int64) (dagDetailDTO *task.DagDetailDTO, err error)
- func (s *ClusterTaskService) GetDagGenericIDBySubTaskId(taskID int64) (dagGenericID string, err error)
- func (s *ClusterTaskService) GetDagIDBySubTaskId(taskID int64) (dagID int64, err error)
- func (s *ClusterTaskService) GetDagInstance(dagId int64) (*task.Dag, error)
- func (s *ClusterTaskService) GetExecuteAgents(ctx *task.TaskContext) []meta.AgentInfo
- func (s *ClusterTaskService) GetLastMaintenanceDag() (*task.Dag, error)
- func (s *ClusterTaskService) GetLocalTaskInstanceByRemoteTaskId(remoteTaskId int64) (*sqlite.SubtaskInstance, error)
- func (s *ClusterTaskService) GetNodeByNodeId(nodeID int64) (*task.Node, error)
- func (s *ClusterTaskService) GetNodeByStage(dagID int64, stage int) (*task.Node, error)
- func (s *ClusterTaskService) GetNodeBySubTask(taskID int64) (*task.Node, error)
- func (s *ClusterTaskService) GetNodes(dag *task.Dag) ([]*task.Node, error)
- func (s *ClusterTaskService) GetRemoteTaskIdByLocalTaskId(localTaskId int64) (int64, error)
- func (s *ClusterTaskService) GetSubTaskByTaskID(taskID int64) (task.ExecutableTask, error)
- func (s *ClusterTaskService) GetSubTaskLogsByTaskID(taskID int64) (subTaskLogs []string, err error)
- func (s *ClusterTaskService) GetSubTasks(node *task.Node) ([]task.ExecutableTask, error)
- func (s *ClusterTaskService) GetTaskMappingByRemoteTaskId(remoteTaskId int64) (*sqlite.TaskMapping, error)
- func (s *ClusterTaskService) GetUnSyncTaskMappingByTime(lastTime time.Time, limit int) (taskMappings []sqlite.TaskMapping, err error)
- func (s *ClusterTaskService) GetUnfinishedDagInstance() (*task.Dag, error)
- func (s *ClusterTaskService) IsRetryTask(localTaskId int64) (isRetry bool, err error)
- func (s *ClusterTaskService) PassDag(dag *task.Dag) error
- func (s *ClusterTaskService) SetDagRetryAndReady(dag *task.Dag) error
- func (s *ClusterTaskService) SetDagRollback(dag *task.Dag) error
- func (s *ClusterTaskService) SetSubTaskFailed(subtask task.ExecutableTask, logContent string) error
- func (s *ClusterTaskService) SetSubTaskReady(subtask task.ExecutableTask, operator int) error
- func (s *ClusterTaskService) SetTaskMappingSync(remoteTaskId int64, executeTimes int) error
- func (s *ClusterTaskService) StartDag(dag *task.Dag) error
- func (s *ClusterTaskService) StartNode(node *task.Node) error
- func (s *ClusterTaskService) StartSubTask(subtask task.ExecutableTask) error
- func (s *ClusterTaskService) UpdateDagStage(dag *task.Dag, nextSage int) error
- func (s *ClusterTaskService) UpdateLocalTaskInstanceByRemoteTask(remoteTask *task.RemoteTask) error
- type DagServiceInterface
- type LocalTaskService
- func (s *LocalTaskService) CancelDag(dag *task.Dag) error
- func (s *LocalTaskService) CreateDagInstanceByTemplate(template *task.Template, ctx *task.TaskContext) (*task.Dag, error)
- func (s *LocalTaskService) CreateLocalTaskInstanceByRemoteTask(remoteTask *task.RemoteTask) (int64, error)
- func (s *LocalTaskService) DeleteRemoteTask() error
- func (s *LocalTaskService) FindLastMaintenanceDag() (*task.Dag, error)
- func (s *LocalTaskService) FinishDagAsFailed(dag *task.Dag) error
- func (s *LocalTaskService) FinishDagAsSucceed(dag *task.Dag) error
- func (s *LocalTaskService) FinishNode(node *task.Node) error
- func (s *LocalTaskService) FinishSubTask(subtask task.ExecutableTask, state int) error
- func (s *LocalTaskService) GetAllUnfinishedDagInstance() ([]*task.Dag, error)
- func (s *LocalTaskService) GetAllUnfinishedSubTasks() ([]task.ExecutableTask, error)
- func (s *LocalTaskService) GetDagDetail(dagId int64) (dagDetailDTO *task.DagDetailDTO, err error)
- func (s *LocalTaskService) GetDagGenericIDBySubTaskId(taskID int64) (dagGenericID string, err error)
- func (s *LocalTaskService) GetDagIDBySubTaskId(taskID int64) (dagID int64, err error)
- func (s *LocalTaskService) GetDagInstance(dagId int64) (*task.Dag, error)
- func (s *LocalTaskService) GetExecuteAgents(ctx *task.TaskContext) []meta.AgentInfo
- func (s *LocalTaskService) GetLastMaintenanceDag() (*task.Dag, error)
- func (s *LocalTaskService) GetLocalTaskInstanceByRemoteTaskId(remoteTaskId int64) (*sqlite.SubtaskInstance, error)
- func (s *LocalTaskService) GetNodeByNodeId(nodeID int64) (*task.Node, error)
- func (s *LocalTaskService) GetNodeByStage(dagID int64, stage int) (*task.Node, error)
- func (s *LocalTaskService) GetNodeBySubTask(taskID int64) (*task.Node, error)
- func (s *LocalTaskService) GetNodeOperatorBySubTaskId(taskID int64) (int, error)
- func (s *LocalTaskService) GetNodes(dag *task.Dag) ([]*task.Node, error)
- func (s *LocalTaskService) GetRemoteTaskIdByLocalTaskId(localTaskId int64) (int64, error)
- func (s *LocalTaskService) GetSubTaskByTaskID(taskID int64) (task.ExecutableTask, error)
- func (s *LocalTaskService) GetSubTaskLogsByTaskID(taskID int64) (subTaskLogs []string, err error)
- func (s *LocalTaskService) GetSubTasks(node *task.Node) ([]task.ExecutableTask, error)
- func (s *LocalTaskService) GetTaskMappingByRemoteTaskId(remoteTaskId int64) (*sqlite.TaskMapping, error)
- func (s *LocalTaskService) GetUnSyncTaskMappingByTime(lastTime time.Time, limit int) (taskMappings []sqlite.TaskMapping, err error)
- func (s *LocalTaskService) GetUnfinishedDagInstance() (*task.Dag, error)
- func (s *LocalTaskService) IsRetryTask(localTaskId int64) (isRetry bool, err error)
- func (s *LocalTaskService) PassDag(dag *task.Dag) error
- func (s *LocalTaskService) SetDagRetryAndReady(dag *task.Dag) error
- func (s *LocalTaskService) SetDagRollback(dag *task.Dag) error
- func (s *LocalTaskService) SetSubTaskFailed(subtask task.ExecutableTask, logContent string) error
- func (s *LocalTaskService) SetSubTaskReady(subtask task.ExecutableTask, operator int) error
- func (s *LocalTaskService) SetTaskMappingSync(remoteTaskId int64, executeTimes int) error
- func (s *LocalTaskService) StartDag(dag *task.Dag) error
- func (s *LocalTaskService) StartNode(node *task.Node) error
- func (s *LocalTaskService) StartSubTask(subtask task.ExecutableTask) error
- func (s *LocalTaskService) UpdateDagStage(dag *task.Dag, nextSage int) error
- func (s *LocalTaskService) UpdateLocalTaskInstanceByRemoteTask(remoteTask *task.RemoteTask) error
- type NodeServiceInterface
- type StatusMaintainerInterface
- type SubTaskLogService
- func (s *SubTaskLogService) CancelDag(dag *task.Dag) error
- func (s *SubTaskLogService) CreateDagInstanceByTemplate(template *task.Template, ctx *task.TaskContext) (*task.Dag, error)
- func (s *SubTaskLogService) CreateLocalTaskInstanceByRemoteTask(remoteTask *task.RemoteTask) (int64, error)
- func (s *SubTaskLogService) FindLastMaintenanceDag() (*task.Dag, error)
- func (s *SubTaskLogService) FinishDagAsFailed(dag *task.Dag) error
- func (s *SubTaskLogService) FinishDagAsSucceed(dag *task.Dag) error
- func (s *SubTaskLogService) FinishNode(node *task.Node) error
- func (s *SubTaskLogService) FinishSubTask(subtask task.ExecutableTask, state int) error
- func (s *SubTaskLogService) GetAllUnfinishedDagInstance() ([]*task.Dag, error)
- func (s *SubTaskLogService) GetAllUnfinishedSubTasks() ([]task.ExecutableTask, error)
- func (s *SubTaskLogService) GetDagDetail(dagId int64) (dagDetailDTO *task.DagDetailDTO, err error)
- func (s *SubTaskLogService) GetDagGenericIDBySubTaskId(taskID int64) (dagGenericID string, err error)
- func (s *SubTaskLogService) GetDagIDBySubTaskId(taskID int64) (dagID int64, err error)
- func (s *SubTaskLogService) GetDagInstance(dagId int64) (*task.Dag, error)
- func (s *SubTaskLogService) GetExecuteAgents(ctx *task.TaskContext) []meta.AgentInfo
- func (s *SubTaskLogService) GetLastMaintenanceDag() (*task.Dag, error)
- func (s *SubTaskLogService) GetLocalTaskInstanceByRemoteTaskId(remoteTaskId int64) (*sqlite.SubtaskInstance, error)
- func (s *SubTaskLogService) GetNodeByNodeId(nodeID int64) (*task.Node, error)
- func (s *SubTaskLogService) GetNodeByStage(dagID int64, stage int) (*task.Node, error)
- func (s *SubTaskLogService) GetNodeBySubTask(taskID int64) (*task.Node, error)
- func (s *SubTaskLogService) GetNodes(dag *task.Dag) ([]*task.Node, error)
- func (s *SubTaskLogService) GetRemoteTaskIdByLocalTaskId(localTaskId int64) (int64, error)
- func (s *SubTaskLogService) GetSubTaskByTaskID(taskID int64) (task.ExecutableTask, error)
- func (s *SubTaskLogService) GetSubTaskLogsByTaskID(taskID int64) (subTaskLogs []string, err error)
- func (s *SubTaskLogService) GetSubTasks(node *task.Node) ([]task.ExecutableTask, error)
- func (s *SubTaskLogService) GetTaskMappingByRemoteTaskId(remoteTaskId int64) (*sqlite.TaskMapping, error)
- func (s *SubTaskLogService) GetUnSyncSubTaskLogById(id int64, limit int) (subTaskLogs []sqlite.SubTaskLog, err error)
- func (s *SubTaskLogService) GetUnSyncTaskMappingByTime(lastTime time.Time, limit int) (taskMappings []sqlite.TaskMapping, err error)
- func (s *SubTaskLogService) GetUnfinishedDagInstance() (*task.Dag, error)
- func (s *SubTaskLogService) InsertLocal(subTaskLog task.TaskExecuteLogDTO) (err error)
- func (s *SubTaskLogService) InsertLocalToRemote(subTaskLog task.TaskExecuteLogDTO) error
- func (s *SubTaskLogService) InsertRemote(subTaskLog task.TaskExecuteLogDTO) (err error)
- func (s *SubTaskLogService) IsRetryTask(localTaskId int64) (isRetry bool, err error)
- func (s *SubTaskLogService) PassDag(dag *task.Dag) error
- func (s *SubTaskLogService) SetDagRetryAndReady(dag *task.Dag) error
- func (s *SubTaskLogService) SetDagRollback(dag *task.Dag) error
- func (s *SubTaskLogService) SetLocalIsSync(subTaskLog *sqlite.SubTaskLog) error
- func (s *SubTaskLogService) SetSubTaskFailed(subtask task.ExecutableTask, logContent string) error
- func (s *SubTaskLogService) SetSubTaskReady(subtask task.ExecutableTask, operator int) error
- func (s *SubTaskLogService) SetTaskMappingSync(remoteTaskId int64, executeTimes int) error
- func (s *SubTaskLogService) StartDag(dag *task.Dag) error
- func (s *SubTaskLogService) StartNode(node *task.Node) error
- func (s *SubTaskLogService) StartSubTask(subtask task.ExecutableTask) error
- func (s *SubTaskLogService) UpdateDagStage(dag *task.Dag, nextSage int) error
- func (s *SubTaskLogService) UpdateLocalTaskInstanceByRemoteTask(remoteTask *task.RemoteTask) error
- type SubTaskLogServiceInterface
- type SubTaskServiceInterface
- type TaskServiceInterface
Constants ¶
This section is empty.
Variables ¶
View Source
var ZERO_TIME = time.Unix(0, 0)
Functions ¶
This section is empty.
Types ¶
type ClusterTaskService ¶
type ClusterTaskService struct {
// contains filtered or unexported fields
}
func NewClusterTaskService ¶
func NewClusterTaskService() *ClusterTaskService
func (*ClusterTaskService) CreateDagInstanceByTemplate ¶
func (*ClusterTaskService) CreateLocalTaskInstanceByRemoteTask ¶
func (s *ClusterTaskService) CreateLocalTaskInstanceByRemoteTask(remoteTask *task.RemoteTask) (int64, error)
func (*ClusterTaskService) FindLastMaintenanceDag ¶
func (*ClusterTaskService) FinishDagAsFailed ¶
func (*ClusterTaskService) FinishDagAsSucceed ¶
func (*ClusterTaskService) FinishNode ¶
func (*ClusterTaskService) FinishSubTask ¶
func (s *ClusterTaskService) FinishSubTask(subtask task.ExecutableTask, state int) error
func (*ClusterTaskService) GetAllUnfinishedDagInstance ¶
func (*ClusterTaskService) GetAllUnfinishedSubTasks ¶
func (s *ClusterTaskService) GetAllUnfinishedSubTasks() ([]task.ExecutableTask, error)
func (*ClusterTaskService) GetDagDetail ¶
func (s *ClusterTaskService) GetDagDetail(dagId int64) (dagDetailDTO *task.DagDetailDTO, err error)
func (*ClusterTaskService) GetDagGenericIDBySubTaskId ¶
func (*ClusterTaskService) GetDagIDBySubTaskId ¶
func (*ClusterTaskService) GetDagInstance ¶
func (*ClusterTaskService) GetExecuteAgents ¶
func (s *ClusterTaskService) GetExecuteAgents(ctx *task.TaskContext) []meta.AgentInfo
func (*ClusterTaskService) GetLastMaintenanceDag ¶
func (*ClusterTaskService) GetLocalTaskInstanceByRemoteTaskId ¶
func (s *ClusterTaskService) GetLocalTaskInstanceByRemoteTaskId(remoteTaskId int64) (*sqlite.SubtaskInstance, error)
func (*ClusterTaskService) GetNodeByNodeId ¶
func (*ClusterTaskService) GetNodeByStage ¶
func (*ClusterTaskService) GetNodeBySubTask ¶
func (*ClusterTaskService) GetRemoteTaskIdByLocalTaskId ¶
func (*ClusterTaskService) GetSubTaskByTaskID ¶
func (s *ClusterTaskService) GetSubTaskByTaskID(taskID int64) (task.ExecutableTask, error)
func (*ClusterTaskService) GetSubTaskLogsByTaskID ¶
func (*ClusterTaskService) GetSubTasks ¶
func (s *ClusterTaskService) GetSubTasks(node *task.Node) ([]task.ExecutableTask, error)
func (*ClusterTaskService) GetTaskMappingByRemoteTaskId ¶
func (s *ClusterTaskService) GetTaskMappingByRemoteTaskId(remoteTaskId int64) (*sqlite.TaskMapping, error)
func (*ClusterTaskService) GetUnSyncTaskMappingByTime ¶
func (*ClusterTaskService) GetUnfinishedDagInstance ¶
func (*ClusterTaskService) IsRetryTask ¶
func (*ClusterTaskService) SetDagRetryAndReady ¶
func (*ClusterTaskService) SetDagRollback ¶
func (*ClusterTaskService) SetSubTaskFailed ¶
func (s *ClusterTaskService) SetSubTaskFailed(subtask task.ExecutableTask, logContent string) error
func (*ClusterTaskService) SetSubTaskReady ¶
func (s *ClusterTaskService) SetSubTaskReady(subtask task.ExecutableTask, operator int) error
func (*ClusterTaskService) SetTaskMappingSync ¶
func (*ClusterTaskService) StartSubTask ¶
func (s *ClusterTaskService) StartSubTask(subtask task.ExecutableTask) error
func (*ClusterTaskService) UpdateDagStage ¶
func (*ClusterTaskService) UpdateLocalTaskInstanceByRemoteTask ¶
func (s *ClusterTaskService) UpdateLocalTaskInstanceByRemoteTask(remoteTask *task.RemoteTask) error
type DagServiceInterface ¶
type DagServiceInterface interface { // Create dag, node, subTasks based on template and context CreateDagInstanceByTemplate(*task.Template, *task.TaskContext) (*task.Dag, error) GetDagInstance(int64) (*task.Dag, error) GetUnfinishedDagInstance() (*task.Dag, error) GetAllUnfinishedDagInstance() ([]*task.Dag, error) GetLastMaintenanceDag() (*task.Dag, error) // Advance dag from ready to running StartDag(*task.Dag) error // Advance dag to next stage UpdateDagStage(*task.Dag, int) error // Advance dag from running to failed FinishDagAsFailed(*task.Dag) error // Advance dag from running to succeed FinishDagAsSucceed(*task.Dag) error CancelDag(*task.Dag) error PassDag(*task.Dag) error SetDagRollback(*task.Dag) error SetDagRetryAndReady(*task.Dag) error }
type LocalTaskService ¶
type LocalTaskService struct {
// contains filtered or unexported fields
}
func NewLocalTaskService ¶
func NewLocalTaskService() *LocalTaskService
func (*LocalTaskService) CreateDagInstanceByTemplate ¶
func (*LocalTaskService) CreateLocalTaskInstanceByRemoteTask ¶
func (s *LocalTaskService) CreateLocalTaskInstanceByRemoteTask(remoteTask *task.RemoteTask) (int64, error)
func (*LocalTaskService) DeleteRemoteTask ¶
func (s *LocalTaskService) DeleteRemoteTask() error
func (*LocalTaskService) FindLastMaintenanceDag ¶
func (*LocalTaskService) FinishDagAsFailed ¶
func (*LocalTaskService) FinishDagAsSucceed ¶
func (*LocalTaskService) FinishNode ¶
func (*LocalTaskService) FinishSubTask ¶
func (s *LocalTaskService) FinishSubTask(subtask task.ExecutableTask, state int) error
func (*LocalTaskService) GetAllUnfinishedDagInstance ¶
func (*LocalTaskService) GetAllUnfinishedSubTasks ¶
func (s *LocalTaskService) GetAllUnfinishedSubTasks() ([]task.ExecutableTask, error)
func (*LocalTaskService) GetDagDetail ¶
func (s *LocalTaskService) GetDagDetail(dagId int64) (dagDetailDTO *task.DagDetailDTO, err error)
func (*LocalTaskService) GetDagGenericIDBySubTaskId ¶
func (*LocalTaskService) GetDagIDBySubTaskId ¶
func (*LocalTaskService) GetDagInstance ¶
func (*LocalTaskService) GetExecuteAgents ¶
func (s *LocalTaskService) GetExecuteAgents(ctx *task.TaskContext) []meta.AgentInfo
func (*LocalTaskService) GetLastMaintenanceDag ¶
func (*LocalTaskService) GetLocalTaskInstanceByRemoteTaskId ¶
func (s *LocalTaskService) GetLocalTaskInstanceByRemoteTaskId(remoteTaskId int64) (*sqlite.SubtaskInstance, error)
func (*LocalTaskService) GetNodeByNodeId ¶
func (*LocalTaskService) GetNodeByStage ¶
func (*LocalTaskService) GetNodeBySubTask ¶
func (*LocalTaskService) GetNodeOperatorBySubTaskId ¶
func (s *LocalTaskService) GetNodeOperatorBySubTaskId(taskID int64) (int, error)
func (*LocalTaskService) GetRemoteTaskIdByLocalTaskId ¶
func (*LocalTaskService) GetSubTaskByTaskID ¶
func (s *LocalTaskService) GetSubTaskByTaskID(taskID int64) (task.ExecutableTask, error)
func (*LocalTaskService) GetSubTaskLogsByTaskID ¶
func (*LocalTaskService) GetSubTasks ¶
func (s *LocalTaskService) GetSubTasks(node *task.Node) ([]task.ExecutableTask, error)
func (*LocalTaskService) GetTaskMappingByRemoteTaskId ¶
func (s *LocalTaskService) GetTaskMappingByRemoteTaskId(remoteTaskId int64) (*sqlite.TaskMapping, error)
func (*LocalTaskService) GetUnSyncTaskMappingByTime ¶
func (*LocalTaskService) GetUnfinishedDagInstance ¶
func (*LocalTaskService) IsRetryTask ¶
func (*LocalTaskService) SetDagRetryAndReady ¶
func (*LocalTaskService) SetDagRollback ¶
func (*LocalTaskService) SetSubTaskFailed ¶
func (s *LocalTaskService) SetSubTaskFailed(subtask task.ExecutableTask, logContent string) error
func (*LocalTaskService) SetSubTaskReady ¶
func (s *LocalTaskService) SetSubTaskReady(subtask task.ExecutableTask, operator int) error
func (*LocalTaskService) SetTaskMappingSync ¶
func (*LocalTaskService) StartSubTask ¶
func (s *LocalTaskService) StartSubTask(subtask task.ExecutableTask) error
func (*LocalTaskService) UpdateDagStage ¶
func (*LocalTaskService) UpdateLocalTaskInstanceByRemoteTask ¶
func (s *LocalTaskService) UpdateLocalTaskInstanceByRemoteTask(remoteTask *task.RemoteTask) error
type NodeServiceInterface ¶
type NodeServiceInterface interface { GetNodes(*task.Dag) ([]*task.Node, error) GetNodeByNodeId(int64) (*task.Node, error) GetNodeByStage(int64, int) (*task.Node, error) // Advance node from pending to running StartNode(*task.Node) error // Advance node from running to succeed/failed FinishNode(*task.Node) error }
type SubTaskLogService ¶
type SubTaskLogService struct {
// contains filtered or unexported fields
}
func (*SubTaskLogService) CreateDagInstanceByTemplate ¶
func (*SubTaskLogService) CreateLocalTaskInstanceByRemoteTask ¶
func (s *SubTaskLogService) CreateLocalTaskInstanceByRemoteTask(remoteTask *task.RemoteTask) (int64, error)
func (*SubTaskLogService) FindLastMaintenanceDag ¶
func (*SubTaskLogService) FinishDagAsFailed ¶
func (*SubTaskLogService) FinishDagAsSucceed ¶
func (*SubTaskLogService) FinishNode ¶
func (*SubTaskLogService) FinishSubTask ¶
func (s *SubTaskLogService) FinishSubTask(subtask task.ExecutableTask, state int) error
func (*SubTaskLogService) GetAllUnfinishedDagInstance ¶
func (*SubTaskLogService) GetAllUnfinishedSubTasks ¶
func (s *SubTaskLogService) GetAllUnfinishedSubTasks() ([]task.ExecutableTask, error)
func (*SubTaskLogService) GetDagDetail ¶
func (s *SubTaskLogService) GetDagDetail(dagId int64) (dagDetailDTO *task.DagDetailDTO, err error)
func (*SubTaskLogService) GetDagGenericIDBySubTaskId ¶
func (*SubTaskLogService) GetDagIDBySubTaskId ¶
func (*SubTaskLogService) GetDagInstance ¶
func (*SubTaskLogService) GetExecuteAgents ¶
func (s *SubTaskLogService) GetExecuteAgents(ctx *task.TaskContext) []meta.AgentInfo
func (*SubTaskLogService) GetLastMaintenanceDag ¶
func (*SubTaskLogService) GetLocalTaskInstanceByRemoteTaskId ¶
func (s *SubTaskLogService) GetLocalTaskInstanceByRemoteTaskId(remoteTaskId int64) (*sqlite.SubtaskInstance, error)
func (*SubTaskLogService) GetNodeByNodeId ¶
func (*SubTaskLogService) GetNodeByStage ¶
func (*SubTaskLogService) GetNodeBySubTask ¶
func (*SubTaskLogService) GetRemoteTaskIdByLocalTaskId ¶
func (*SubTaskLogService) GetSubTaskByTaskID ¶
func (s *SubTaskLogService) GetSubTaskByTaskID(taskID int64) (task.ExecutableTask, error)
func (*SubTaskLogService) GetSubTaskLogsByTaskID ¶
func (*SubTaskLogService) GetSubTasks ¶
func (s *SubTaskLogService) GetSubTasks(node *task.Node) ([]task.ExecutableTask, error)
func (*SubTaskLogService) GetTaskMappingByRemoteTaskId ¶
func (s *SubTaskLogService) GetTaskMappingByRemoteTaskId(remoteTaskId int64) (*sqlite.TaskMapping, error)
func (*SubTaskLogService) GetUnSyncSubTaskLogById ¶
func (s *SubTaskLogService) GetUnSyncSubTaskLogById(id int64, limit int) (subTaskLogs []sqlite.SubTaskLog, err error)
func (*SubTaskLogService) GetUnSyncTaskMappingByTime ¶
func (*SubTaskLogService) GetUnfinishedDagInstance ¶
func (*SubTaskLogService) InsertLocal ¶
func (s *SubTaskLogService) InsertLocal(subTaskLog task.TaskExecuteLogDTO) (err error)
func (*SubTaskLogService) InsertLocalToRemote ¶
func (s *SubTaskLogService) InsertLocalToRemote(subTaskLog task.TaskExecuteLogDTO) error
func (*SubTaskLogService) InsertRemote ¶
func (s *SubTaskLogService) InsertRemote(subTaskLog task.TaskExecuteLogDTO) (err error)
func (*SubTaskLogService) IsRetryTask ¶
func (*SubTaskLogService) SetDagRetryAndReady ¶
func (*SubTaskLogService) SetDagRollback ¶
func (*SubTaskLogService) SetLocalIsSync ¶
func (s *SubTaskLogService) SetLocalIsSync(subTaskLog *sqlite.SubTaskLog) error
func (*SubTaskLogService) SetSubTaskFailed ¶
func (s *SubTaskLogService) SetSubTaskFailed(subtask task.ExecutableTask, logContent string) error
func (*SubTaskLogService) SetSubTaskReady ¶
func (s *SubTaskLogService) SetSubTaskReady(subtask task.ExecutableTask, operator int) error
func (*SubTaskLogService) SetTaskMappingSync ¶
func (*SubTaskLogService) StartSubTask ¶
func (s *SubTaskLogService) StartSubTask(subtask task.ExecutableTask) error
func (*SubTaskLogService) UpdateDagStage ¶
func (*SubTaskLogService) UpdateLocalTaskInstanceByRemoteTask ¶
func (s *SubTaskLogService) UpdateLocalTaskInstanceByRemoteTask(remoteTask *task.RemoteTask) error
type SubTaskServiceInterface ¶
type SubTaskServiceInterface interface { CreateLocalTaskInstanceByRemoteTask(*task.RemoteTask) (int64, error) GetLocalTaskInstanceByRemoteTaskId(int64) (*sqlite.SubtaskInstance, error) GetSubTasks(*task.Node) ([]task.ExecutableTask, error) GetSubTaskByTaskID(int64) (task.ExecutableTask, error) GetAllUnfinishedSubTasks() ([]task.ExecutableTask, error) GetTaskMappingByRemoteTaskId(int64) (*sqlite.TaskMapping, error) GetUnSyncTaskMappingByTime(time.Time, int) ([]sqlite.TaskMapping, error) GetRemoteTaskIdByLocalTaskId(int64) (int64, error) // Advance subTask from ready to running StartSubTask(task.ExecutableTask) error // Advance subTask from running to succeed/failed FinishSubTask(task.ExecutableTask, int) error // Advance subTask to ready SetSubTaskReady(task.ExecutableTask, int) error // Advance subTask from running to failed SetSubTaskFailed(task.ExecutableTask, string) error // Advance IsSync to true SetTaskMappingSync(int64, int) error UpdateLocalTaskInstanceByRemoteTask(remoteTask *task.RemoteTask) error }
type TaskServiceInterface ¶
type TaskServiceInterface interface { DagServiceInterface NodeServiceInterface SubTaskServiceInterface SubTaskLogServiceInterface StatusMaintainerInterface // Get the agents that executes the task from TaskContext GetExecuteAgents(*task.TaskContext) []meta.AgentInfo }
Click to show internal directories.
Click to hide internal directories.