jobs

package
v0.0.0-...-7cdc305 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2025 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddWorker

func AddWorker[T river.JobArgs](worker river.Worker[T])

func Get

func Get(ctx context.Context, id int64) (*rivertype.JobRow, error)

func GetAdminServer

func GetAdminServer(ctx context.Context) (echo.MiddlewareFunc, error)

func RegisterPeriodicJob

func RegisterPeriodicJob(p *river.PeriodicJob)

func Shutdown

func Shutdown()

func Start

func Start(ctx context.Context) (err error)

Types

type AdditionalJobs

type AdditionalJobs struct {
	Jobs []int64
}

AdditionalJobs is the output format of a job that queues additional jobs when it is done. It allows tracking a series of jobs

func NewAdditionalJobs

func NewAdditionalJobs(ctx context.Context, jobArgs ...river.JobArgs) (AdditionalJobs, error)

NewAdditionalJobs takes a list of job args, queues them all and returns an AdditionalJobs with their IDs

func (AdditionalJobs) Progress

func (a AdditionalJobs) Progress(ctx context.Context) (*rivertype.JobRow, error)

Progress returns the currently waiting job, or nil if all the jobs are done

Jump to

Keyboard shortcuts

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