tasks

package
v1.2.175 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeEmailDelivery = "email:deliver"
	TypeImageResize   = "image:resize"
)

A list of task types.

Variables

This section is empty.

Functions

func HandleEmailDeliveryTask

func HandleEmailDeliveryTask(ctx context.Context, t *asynq.Task) error

Types

type EmailDeliveryPayload

type EmailDeliveryPayload struct {
	UserID     int
	TemplateID string
}

type ImageProcessor

type ImageProcessor struct {
}

ImageProcessor implements asynq.Handler interface.

func NewImageProcessor

func NewImageProcessor() *ImageProcessor

func (*ImageProcessor) ProcessTask

func (processor *ImageProcessor) ProcessTask(ctx context.Context, t *asynq.Task) error

type ImageResizePayload

type ImageResizePayload struct {
	SourceURL string
}

Jump to

Keyboard shortcuts

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