Documentation
¶
Index ¶
- Variables
- func MaybeCompleteRunIfAllReposTerminal(ctx context.Context, st store.Store, eventsService *events.Service, ...) (bool, error)
- func MaybeUpdateRunStatus(ctx context.Context, st store.Store, runID domaintypes.RunID, attempt int32) (bool, error)
- type Options
- type RunAttemptReconcileEval
- type StaleJobRecoveryTask
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNilStore = errors.New("stale-job-recovery: store is required")
ErrNilStore is returned when NewStaleJobRecoveryTask is called with nil Store.
Functions ¶
Types ¶
type Options ¶
type Options struct {
Store store.Store
EventsService *events.Service
Interval time.Duration
NodeStaleAfter time.Duration
Logger *slog.Logger
GitLabTokens *gitlabtokens.Registry
}
Options configures stale running-job recovery task behavior.
type RunAttemptReconcileEval ¶
type RunAttemptReconcileEval struct {
ShouldUpdate bool
Status domaintypes.RunStatus
LastJob *store.Job
}
RunAttemptReconcileEval is the pure evaluation result for run-attempt completion.
func EvaluateRunAttemptTerminalStatus ¶
func EvaluateRunAttemptTerminalStatus(jobs []store.Job) (RunAttemptReconcileEval, error)
EvaluateRunAttemptTerminalStatus determines whether runs.status can be finalized.
type StaleJobRecoveryTask ¶
type StaleJobRecoveryTask struct {
// contains filtered or unexported fields
}
StaleJobRecoveryTask scans for stale Running jobs and reconciles run/wave state.
func NewStaleJobRecoveryTask ¶
func NewStaleJobRecoveryTask(opts Options) (*StaleJobRecoveryTask, error)
NewStaleJobRecoveryTask constructs a stale recovery task.
func (*StaleJobRecoveryTask) Interval ¶
func (t *StaleJobRecoveryTask) Interval() time.Duration
Interval returns how often the recovery cycle should run.
func (*StaleJobRecoveryTask) Name ¶
func (t *StaleJobRecoveryTask) Name() string
Name returns the task name for the scheduler.
Click to show internal directories.
Click to hide internal directories.