recovery

package
Version: v0.0.0-...-a69e935 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package recovery package can be used to do a fast resync of jobs and tasks in DB.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecoverActiveJobs

func RecoverActiveJobs(
	ctx context.Context,
	parentScope tally.Scope,
	activeJobsOps ormobjects.ActiveJobsOps,
	jobConfigOps ormobjects.JobConfigOps,
	jobRuntimeOps ormobjects.JobRuntimeOps,
	f RecoverBatchTasks,
) error

RecoverActiveJobs is the handler to start a job recovery.

Types

type JobsBatch

type JobsBatch struct {
	// contains filtered or unexported fields
}

JobsBatch is used to track a batch of jobs.

type Metrics

type Metrics struct {
	// contains filtered or unexported fields
}

Metrics contains counters to track recovery metrics

func NewMetrics

func NewMetrics(scope tally.Scope) *Metrics

NewMetrics returns a new Metrics struct.

type RecoverBatchTasks

type RecoverBatchTasks func(
	ctx context.Context,
	jobID string,
	jobConfig *job.JobConfig,
	configAddOn *models.ConfigAddOn,
	jobRuntime *job.RuntimeInfo,
	batch TasksBatch,
	errChan chan<- error)

RecoverBatchTasks is a function type which is used to recover a batch of tasks for a job.

type TasksBatch

type TasksBatch struct {
	From uint32
	To   uint32
}

TasksBatch is used to track a batch of tasks in a job.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL