jobs

package
v0.18.15 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	New Status = iota
	InProgress
	Completed
	Failed

	Max_Retry_Count int = 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job interface {
	DoMyJob(ctx interface{})
	IsDone() bool
	IsFailed() bool
	GetType() string
	GetJobID() string
}

type JobStore

type JobStore struct {
	storage.SessionedStorage
	// contains filtered or unexported fields
}

func NewJobStore

func NewJobStore(config config.Server, dbDir string) *JobStore

func (*JobStore) DeleteJob

func (js *JobStore) DeleteJob(job Job) error

func (*JobStore) GetJob

func (js *JobStore) GetJob(jobID string) (Job, error)

func (*JobStore) Iterate

func (js *JobStore) Iterate(fn func(job Job))

func (*JobStore) JobExists added in v0.14.3

func (js *JobStore) JobExists(jobID string) (bool, error)

func (*JobStore) SaveJob

func (js *JobStore) SaveJob(job Job) error

func (*JobStore) WithChain

func (js *JobStore) WithChain(chain chain.Type) *JobStore

type Status

type Status int

Jump to

Keyboard shortcuts

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