queue

package
v0.0.0-...-ff237a8 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	Client    *asynq.Client
	Inspector *asynq.Inspector
	Server    *asynq.Server
}

func Init

func Init(ops *asynq.RedisClientOpt) *Service

func (*Service) ArchiveTask

func (s *Service) ArchiveTask(ctx context.Context, queueName string, taskId string) error

func (*Service) Clear

func (s *Service) Clear(ctx context.Context, name string) ([]*asynq.TaskInfo, error)

func (*Service) DeleteTask

func (s *Service) DeleteTask(ctx context.Context, queueName string, taskId string) error

func (*Service) Enqueue

func (s *Service) Enqueue(ctx context.Context, task *asynq.Task, opts ...asynq.Option) (*asynq.TaskInfo, error)

func (*Service) Get

func (s *Service) Get(ctx context.Context, name string) (*asynq.QueueInfo, error)

func (*Service) RunTask

func (s *Service) RunTask(ctx context.Context, queueName string, taskId string) error

func (*Service) StartServer

func (s *Service) StartServer(ctx context.Context, workPkg types.IWorker)

func (*Service) TogglePause

func (s *Service) TogglePause(ctx context.Context, name string) error

Jump to

Keyboard shortcuts

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