代码拉取完成,页面将自动刷新
同步操作将从 chararch/gobatch 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
package gobatch
import (
"github.com/chararch/gobatch/status"
"time"
)
//JobExecution represents context of a job execution
type JobExecution struct {
JobExecutionId int64
JobInstanceId int64
JobName string
JobParams map[string]interface{}
JobStatus status.BatchStatus
StepExecutions []*StepExecution
JobContext *BatchContext
CreateTime time.Time
StartTime time.Time
EndTime time.Time
FailError BatchError
Version int64
}
//AddStepExecution add a step execution in this job
func (e *JobExecution) AddStepExecution(execution *StepExecution) {
e.StepExecutions = append(e.StepExecutions, execution)
}
//StepExecution represents context of a step execution
type StepExecution struct {
StepExecutionId int64
StepName string
StepStatus status.BatchStatus
StepContext *BatchContext
StepContextId int64
StepExecutionContext *BatchContext
JobExecution *JobExecution
CreateTime time.Time
StartTime time.Time
EndTime time.Time
ReadCount int64
WriteCount int64
CommitCount int64
FilterCount int64
ReadSkipCount int64
WriteSkipCount int64
ProcessSkipCount int64
RollbackCount int64
FailError BatchError
LastUpdated time.Time
Version int64
}
func (execution *StepExecution) finish(err BatchError) {
if err != nil {
execution.StepStatus = status.FAILED
execution.FailError = err
execution.EndTime = time.Now()
} else {
execution.StepStatus = status.COMPLETED
execution.EndTime = time.Now()
}
}
func (execution *StepExecution) start() {
execution.StartTime = time.Now()
execution.StepStatus = status.STARTED
}
func (execution *StepExecution) deepCopy() *StepExecution {
result := &StepExecution{
StepName: execution.StepName,
StepStatus: status.STARTING,
StepContext: execution.StepContext.DeepCopy(),
StepContextId: execution.StepContextId,
StepExecutionContext: execution.StepExecutionContext.DeepCopy(),
JobExecution: execution.JobExecution,
CreateTime: time.Now(),
}
return result
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。