Documentation ¶
Index ¶
- func Init(cfg Config) (machineryServer *machinery.Server, err error)
- func NewBlankBackend() iface.Backend
- type Backend
- func (b *Backend) GetState(taskUUID string) (*tasks.TaskState, error)
- func (b *Backend) GroupCompleted(groupUUID string, groupTaskCount int) (bool, error)
- func (b *Backend) GroupTaskStates(groupUUID string, groupTaskCount int) ([]*tasks.TaskState, error)
- func (b *Backend) InitGroup(groupUUID string, taskUUIDs []string) error
- func (b *Backend) IsAMQP() bool
- func (b *Backend) PurgeGroupMeta(groupUUID string) error
- func (b *Backend) PurgeState(taskUUID string) error
- func (b *Backend) SetStateFailure(signature *tasks.Signature, err string) error
- func (b *Backend) SetStatePending(signature *tasks.Signature) error
- func (b *Backend) SetStateReceived(signature *tasks.Signature) error
- func (b *Backend) SetStateRetry(signature *tasks.Signature) error
- func (b *Backend) SetStateStarted(signature *tasks.Signature) error
- func (b *Backend) SetStateSuccess(signature *tasks.Signature, results []*tasks.TaskResult) error
- func (b *Backend) TriggerChord(groupUUID string) (bool, error)
- type Config
- type DebugLogger
- func (d DebugLogger) Fatal(args ...interface{})
- func (d DebugLogger) Fatalf(s string, args ...interface{})
- func (d DebugLogger) Fatalln(args ...interface{})
- func (d DebugLogger) Panic(args ...interface{})
- func (d DebugLogger) Panicf(s string, args ...interface{})
- func (d DebugLogger) Panicln(args ...interface{})
- func (d DebugLogger) Print(args ...interface{})
- func (d DebugLogger) Printf(s string, args ...interface{})
- func (d DebugLogger) Println(args ...interface{})
- type ZLogger
- func (l ZLogger) Fatal(args ...interface{})
- func (l ZLogger) Fatalf(s string, args ...interface{})
- func (l ZLogger) Fatalln(args ...interface{})
- func (l ZLogger) Panic(args ...interface{})
- func (l ZLogger) Panicf(s string, args ...interface{})
- func (l ZLogger) Panicln(args ...interface{})
- func (l ZLogger) Print(args ...interface{})
- func (l ZLogger) Printf(s string, args ...interface{})
- func (l ZLogger) Println(args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBlankBackend ¶
NewBlankBackend creates blank Backend instance
Types ¶
type Backend ¶
refer: https://github.com/RichardKnop/machinery/issues/325 Backend represents a "blank" result backend
func (*Backend) GroupCompleted ¶
GroupCompleted returns true if all tasks in a group finished
func (*Backend) GroupTaskStates ¶
GroupTaskStates returns states of all tasks in the group
func (*Backend) PurgeGroupMeta ¶
PurgeGroupMeta deletes stored group meta data
func (*Backend) PurgeState ¶
PurgeState deletes stored task state
func (*Backend) SetStateFailure ¶
SetStateFailure updates task state to FAILURE
func (*Backend) SetStatePending ¶
SetStatePending updates task state to PENDING
func (*Backend) SetStateReceived ¶
SetStateReceived updates task state to RECEIVED
func (*Backend) SetStateRetry ¶
SetStateRetry updates task state to RETRY
func (*Backend) SetStateStarted ¶
SetStateStarted updates task state to STARTED
func (*Backend) SetStateSuccess ¶
SetStateSuccess updates task state to SUCCESS
func (*Backend) TriggerChord ¶
TriggerChord flags chord as triggered in the backend storage to make sure chord is never trigerred multiple times. Returns a boolean flag to indicate whether the worker should trigger chord (true) or no if it has been triggered already (false)
type Config ¶
type Config struct { Broker string `yaml:"broker"` DefaultQueue string `yaml:"default_queue"` Exchange string `yaml:"exchange"` ExchangeType string `yaml:"exchange_type"` BindingKey string `yaml:"binding_key"` PrefetchCount int `yaml:"prefetch_count"` }
wrap machinery config
type DebugLogger ¶
type DebugLogger struct{}
func (DebugLogger) Fatal ¶
func (d DebugLogger) Fatal(args ...interface{})
func (DebugLogger) Fatalf ¶
func (d DebugLogger) Fatalf(s string, args ...interface{})
func (DebugLogger) Fatalln ¶
func (d DebugLogger) Fatalln(args ...interface{})
func (DebugLogger) Panic ¶
func (d DebugLogger) Panic(args ...interface{})
func (DebugLogger) Panicf ¶
func (d DebugLogger) Panicf(s string, args ...interface{})
func (DebugLogger) Panicln ¶
func (d DebugLogger) Panicln(args ...interface{})
func (DebugLogger) Print ¶
func (d DebugLogger) Print(args ...interface{})
func (DebugLogger) Printf ¶
func (d DebugLogger) Printf(s string, args ...interface{})
func (DebugLogger) Println ¶
func (d DebugLogger) Println(args ...interface{})