Documentation ¶
Index ¶
- func RegisterTask(name string, function any)
- func StartServer(tasksConfig Config) (server *machinery.Server, err error)
- type Broker
- func (b *Broker) Cleanup()
- func (b *Broker) SendChainWithContext(chain *tasks.Chain) (*result.ChainAsyncResult, error)
- func (b *Broker) SendChordWithContext(chord *tasks.Chord, sendConcurrency int) (*result.ChordAsyncResult, error)
- func (b *Broker) SendGroupWithContext(group *tasks.Group, sendConcurrency int) ([]*result.AsyncResult, error)
- func (b *Broker) SendTaskWithContext(signature *tasks.Signature) (*result.AsyncResult, error)
- type Config
- type PeriodicTaskSignature
- type RedisConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterTask ¶
func StartServer ¶
Types ¶
type Broker ¶
type Broker struct { CleanupMachinery func() CleanupSpan func() BatchID string Server *machinery.Server Ctx context.Context }
func (*Broker) Cleanup ¶
func (b *Broker) Cleanup()
Cleanup cleans up the machinery server and the span that were created for this Broker.
func (*Broker) SendChainWithContext ¶
SendChainWithContext acts as a wrapper for machinery.Server.SendChainWithContext
func (*Broker) SendChordWithContext ¶
func (b *Broker) SendChordWithContext(chord *tasks.Chord, sendConcurrency int) (*result.ChordAsyncResult, error)
SendChordWithContext acts as a wrapper for machinery.Server.SendChordWithContext
func (*Broker) SendGroupWithContext ¶
func (b *Broker) SendGroupWithContext(group *tasks.Group, sendConcurrency int) ([]*result.AsyncResult, error)
SendGroupWithContext acts as a wrapper for machinery.Server.SendGroupWithContext
func (*Broker) SendTaskWithContext ¶
SendTaskWithContext acts as a wrapper for machinery.Server.SendTaskWithContext.
type Config ¶
type Config interface { TasksDefaultQueue() string TasksResultsExpireIn() int TasksBroker() string TasksResultBackend() string TasksRedis() RedisConfig TasksPeriodicTaskSignatures() map[string]PeriodicTaskSignature TasksPeriodicTaskSignature(taskName string) PeriodicTaskSignature }
type PeriodicTaskSignature ¶
Click to show internal directories.
Click to hide internal directories.