tasks

package
v0.0.0-...-e90a31b Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// queue name
	QueueCritical = "critical"
	QueueDefault  = "default"
	QueueLow      = "low"
)
View Source
const (
	TypeEmailWelcome = "email:welcome"
)

Variables

This section is empty.

Functions

func Example

func Example()

func GetClient

func GetClient() *asynq.Client

func HandleEmailWelcomeTask

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

func NewEmailWelcomeTask

func NewEmailWelcomeTask(userID int) (*asynq.Task, error)

Types

type Config

type Config struct {
	Addr         string
	Password     string
	DB           int
	MinIdleConn  int
	DialTimeout  time.Duration
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
	PoolSize     int
	PoolTimeout  time.Duration
	Concurrency  int //并发数
}

type EmailWelcomePayload

type EmailWelcomePayload struct {
	UserID int
}

Jump to

Keyboard shortcuts

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