jobqueue

package
v0.0.0-...-786d6a2 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package jobqueue implements a reliable job queue that is persisted to the file system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompletionMarkers

type CompletionMarkers struct {
	UploadedOriginals bool
	Converted         bool
	UploadedPDF       bool
	Renamed           bool
}

type Job

type Job struct {
	Markers    CompletionMarkers
	NewName    string
	PDFDriveId string
	// contains filtered or unexported fields
}

func (*Job) AddDerivedFile

func (j *Job) AddDerivedFile(name string, contents []byte) error

func (*Job) CommitMarker

func (j *Job) CommitMarker(name string) error

func (*Job) Filenames

func (j *Job) Filenames() ([]string, error)

func (*Job) Id

func (j *Job) Id() string

func (*Job) Pages

func (j *Job) Pages() []*page.Any

func (*Job) State

func (j *Job) State() State

func (*Job) WritePDFDriveID

func (j *Job) WritePDFDriveID(driveId string) error

type Queue

type Queue struct {
	Dir string
}

func (*Queue) AddJob

func (q *Queue) AddJob(pages []*page.Any) (*Job, error)

func (*Queue) JobById

func (q *Queue) JobById(id string) (*Job, error)

func (*Queue) Scans

func (q *Queue) Scans() (map[string]*Job, error)

type State

type State int
const (
	Canceled State = iota
	InProgress
	Done
)

func (State) String

func (s State) String() string

Jump to

Keyboard shortcuts

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