queue

package
v0.0.0-...-1b34132 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dashboard

func Dashboard(redisURL string) *asynqmon.HTTPHandler

func Init

func Init(redisURL string, concurrency int)

Types

type Instance

type Instance struct {
	Client    *asynq.Client
	Server    *asynq.ServeMux
	Scheduler *asynq.Scheduler
	Inspector *asynq.Inspector
}

Instance ...

func GetInstance

func GetInstance() Instance

GetInstance ...

func (Instance) RemoveScheduler

func (i Instance) RemoveScheduler(id string) error

func (Instance) RunTask

func (i Instance) RunTask(queue string, payload []byte, retryTimes int) (*asynq.TaskInfo, error)

RunTask ...

func (Instance) ScheduleTask

func (i Instance) ScheduleTask(typename string, payload []byte, cronSpec string, retryTimes int) (string, error)

ScheduleTask create new task and run at specific time cronSpec follow cron expression https://www.freeformatter.com/cron-expression-generator-quartz.html

Jump to

Keyboard shortcuts

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