Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RunningChainReaper ¶
type RunningChainReaper struct {
// contains filtered or unexported fields
}
RunningChainReaper ...
func NewRunningChainReaper ¶
func NewRunningChainReaper(grapher *graph.Grapher, logger *infra.Logger, doneJobChan, runJobChan chan job.Job) *RunningChainReaper
NewRunningChainReaper ...
func (*RunningChainReaper) Finalize ¶
func (r *RunningChainReaper) Finalize(complete bool)
Finalize determines the final state of the chain
func (*RunningChainReaper) Reap ¶
func (r *RunningChainReaper) Reap(job *job.Job)
Reap takes a job that just finished running, saves its final state, and prepares to continue running the chain (or recognizes that the chain is done running).
If chain is done: save final state + stop running more jobs. If job failed: retry sequence if possible. If job completed: prepared subsequent jobs and enqueue if runnable.
func (*RunningChainReaper) Run ¶
func (r *RunningChainReaper) Run(ctx context.Context)
Run reaps jobs when they finish running. For each job reaped, if... - chain is done: save final state . - job failed: retry sequence if possible. - job completed: prepared subsequent jobs and enqueue if runnable.
func (*RunningChainReaper) Stop ¶
func (r *RunningChainReaper) Stop(ctx context.Context)
Stop stops the reaper from reaping any more jobs. It blocks until the reaper is stopped (will reap no more jobs and Run will return).
type Traverser ¶
type Traverser struct {
// contains filtered or unexported fields
}
Traverser ...
func NewTraverser ¶
func NewTraverser(grapher *graph.Grapher, logger *infra.Logger, stopTimeout, sendTimeout time.Duration) *Traverser
NewTraverser ...