Documentation ¶
Index ¶
- Constants
- Variables
- func Audit(l *logrus.Entry, task *model.Task) (err error)
- func ExecuteWorkflow(workflow *model.Workflow, userId uint) error
- func InitSqled(exit chan struct{})
- type Sqled
- func (s *Sqled) AddTask(taskId string, typ int) error
- func (s *Sqled) AddTaskWaitResult(taskId string, typ int) (*model.Task, error)
- func (s *Sqled) CleanExpiredTasks(entry *logrus.Entry)
- func (s *Sqled) CleanExpiredWorkflows(entry *logrus.Entry)
- func (s *Sqled) HasTask(taskId string) bool
- func (s *Sqled) Start()
- func (s *Sqled) WorkflowSchedule(entry *logrus.Entry)
Constants ¶
View Source
const ( ActionTypeAudit = iota + 1 ActionTypeExecute ActionTypeRollback )
View Source
const (
SqlAuditTaskExpiredTime = 3 * 24 // 3 days
)
Variables ¶
View Source
var ( ErrActionExecuteOnExecutedTask = _errors.New("task has been executed, can not do execute on it") ErrActionExecuteOnNonAuditedTask = _errors.New("task has not been audited, can not do execute on it") ErrActionRollbackOnRollbackedTask = _errors.New("task has been rollbacked, can not do rollback on it") ErrActionRollbackOnExecuteFailedTask = _errors.New("task has been executed failed, can not do rollback on it") ErrActionRollbackOnNonExecutedTask = _errors.New("task has not been executed, can not do rollback on it") )
Functions ¶
func ExecuteWorkflow ¶ added in v1.2112.0
Types ¶
type Sqled ¶
Sqled is an async task scheduling service. receive tasks from queue, the tasks include inspect, execute, rollback; and the task will only be executed once.
func (*Sqled) AddTaskWaitResult ¶
func (*Sqled) CleanExpiredTasks ¶
func (*Sqled) CleanExpiredWorkflows ¶
func (*Sqled) WorkflowSchedule ¶ added in v1.2112.0
Click to show internal directories.
Click to hide internal directories.