Files
MyGoNavi/internal/syncjob/permanent_error.go
Syngnat bc02a4c614 feat(syncjob): 新增可恢复的数据同步任务运行时
- 持久化任务、运行、事件、检查点与错误行状态
- 支持调度、暂停取消、恢复重试、并发限制和故障接管
- 增加执行 fencing、连续失败退避与错误行重放租约
2026-08-08 19:06:57 +08:00

30 lines
702 B
Go

package syncjob
// PermanentExecutionError marks an execution failure that cannot be repaired by
// retrying the same persisted task definition. The manager pauses the task only
// when the owning executor successfully commits this run's failed terminal state.
type PermanentExecutionError struct {
Err error
}
func (e *PermanentExecutionError) Error() string {
if e == nil || e.Err == nil {
return "permanent data sync execution failure"
}
return e.Err.Error()
}
func (e *PermanentExecutionError) Unwrap() error {
if e == nil {
return nil
}
return e.Err
}
func MarkPermanentExecutionError(err error) error {
if err == nil {
return nil
}
return &PermanentExecutionError{Err: err}
}