command

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FailRunningJobs added in v1.1.0

func FailRunningJobs(
	reader domain.JobsReader,
	writer domain.JobsWriter,
) func(context.Context, error) error

Mark all running jobs as failed with the given reason. This is mostly used when the server has crashed or has been hard resetted and some job were processing.

func Process added in v1.1.0

func Process(writer domain.JobsWriter, handler domain.Handler) func(context.Context, domain.Job) error

Process a single job. Called by async workers that's why there are no command here.

func Queue

func Queue(
	writer domain.JobsWriter,
	handler domain.Handler,
) func(context.Context, QueueCommand) error

Types

type QueueCommand

type QueueCommand struct {
	Payload any `json:"payload"`
}

Jump to

Keyboard shortcuts

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