Versions in this module Expand all Collapse all v2 v2.0.14 Oct 26, 2024 Changes in this version + var ErrWorkerQuitAbruptly = errors.New("Worker quit abruptly") + var ErrWorkerQuitGracefully = errors.New("Worker quit gracefully") + func RedactURL(urlString string) string + type Server struct + func NewServer(cnf *config.Config, brokerServer brokersiface.Broker, ...) *Server + func (server *Server) GetBackend() backendsiface.Backend + func (server *Server) GetBroker() brokersiface.Broker + func (server *Server) GetConfig() *config.Config + func (server *Server) GetRegisteredTask(name string) (interface{}, error) + func (server *Server) GetRegisteredTaskNames() []string + func (server *Server) IsTaskRegistered(name string) bool + func (server *Server) NewCustomQueueWorker(consumerTag string, concurrency int, queue string) *Worker + func (server *Server) NewWorker(consumerTag string, concurrency int) *Worker + func (server *Server) RegisterPeriodicChain(spec, name string, signatures ...*tasks.Signature) error + func (server *Server) RegisterPeriodicChord(spec, name string, sendConcurrency int, callback *tasks.Signature, ...) error + func (server *Server) RegisterPeriodicGroup(spec, name string, sendConcurrency int, signatures ...*tasks.Signature) error + func (server *Server) RegisterPeriodicTask(spec, name string, signature *tasks.Signature) error + func (server *Server) RegisterTask(name string, taskFunc interface{}) error + func (server *Server) RegisterTasks(namedTaskFuncs map[string]interface{}) error + func (server *Server) SendChain(chain *tasks.Chain) (*result.ChainAsyncResult, error) + func (server *Server) SendChainWithContext(ctx context.Context, chain *tasks.Chain) (*result.ChainAsyncResult, error) + func (server *Server) SendChord(chord *tasks.Chord, sendConcurrency int) (*result.ChordAsyncResult, error) + func (server *Server) SendChordWithContext(ctx context.Context, chord *tasks.Chord, sendConcurrency int) (*result.ChordAsyncResult, error) + func (server *Server) SendGroup(group *tasks.Group, sendConcurrency int) ([]*result.AsyncResult, error) + func (server *Server) SendGroupWithContext(ctx context.Context, group *tasks.Group, sendConcurrency int) ([]*result.AsyncResult, error) + func (server *Server) SendTask(signature *tasks.Signature) (*result.AsyncResult, error) + func (server *Server) SendTaskWithContext(ctx context.Context, signature *tasks.Signature) (*result.AsyncResult, error) + func (server *Server) SetBackend(backend backendsiface.Backend) + func (server *Server) SetBroker(broker brokersiface.Broker) + func (server *Server) SetConfig(cnf *config.Config) + func (server *Server) SetPreTaskHandler(handler func(*tasks.Signature)) + type Worker struct + Concurrency int + ConsumerTag string + Queue string + func (worker *Worker) CustomQueue() string + func (worker *Worker) GetServer() *Server + func (worker *Worker) Launch() error + func (worker *Worker) LaunchAsync(errorsChan chan<- error) + func (worker *Worker) PreConsumeHandler() bool + func (worker *Worker) Process(signature *tasks.Signature) error + func (worker *Worker) Quit() + func (worker *Worker) SetErrorHandler(handler func(err error)) + func (worker *Worker) SetPostTaskHandler(handler func(*tasks.Signature)) + func (worker *Worker) SetPreConsumeHandler(handler func(*Worker) bool) + func (worker *Worker) SetPreTaskHandler(handler func(*tasks.Signature)) Other modules containing this package github.com/printesoi/machinery